Bayesian optimization of generalized data