Bayesian optimization by density ratio estimation