Bayesian Optimization in Theory and Practice