For a set of variables I want to find for which variable combinations a function becomes (close to) zero. As the evaluation of this function is quite costly, I want to use bayesian optimization. There are some python packages for this, but I need a stochastic version of this, as my function involves some randomness. Is there a package that provides stochastic gaussian processes as a surrogate model?

The difference between a stochastic model and a "normal" model is how they treat evaluations of the function. A normal model will evaluate the function and treat this as the real value at point x. A stochastic model will assume that the function is stochastic and therefore has a random component (noise, error terms etc). Therefore it will not model the surrogate model to actually pass through all the points that have been evaluated but just assume that the function produces values around where the evaluations are.

So when I use a non-stochastic model and it evaluates a point next to the current optimum which would on average produce an even lower value but due to random effects gives a higher value this time then the non-stochastic model will not search further in this direction even though it is the right direction.


Have a look at GPyOpt. Personally, I've only toyed with it, but it uses GPs for Bayesian optimization and therefore should deal with intrinsic variance in the loss surface. Plus, Sheffield ML has a great reputation for GP research, so I'd expect the code base to be top-notch.

  • I don't see any option to use a stochastic model though. With the package I'm using (also just normal GP) it doesn't seem to handle the noise well at all
    – Katy
    Aug 13 '19 at 9:25
  • @Katy okay. I think I may just not get what your requirements are. It might be helpful to expand your question by adding a detailed example of the failure and what your expectation is for correct handling of your dataset. Specifically, I'm not entirely clear on what your use of the term "stochastic model" encompasses, so perhaps describe that more explicitly.
    – merv
    Aug 13 '19 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.