bayesian-optimization / BayesianOptimization

A Python implementation of global optimization with gaussian processes.
https://bayesian-optimization.github.io/BayesianOptimization/index.html
MIT License
7.95k stars 1.55k forks source link

Make n_restarts_optimizer dynamic #448

Closed hwrightson closed 1 year ago

hwrightson commented 1 year ago

Just looking at an application of this in some custom code, and please let me know whether I'm correct in understanding that _n_restartsoptimizer in the BayesianOptimisation function is the parameter that controls the number of runs/iterations the optimiser takes to reach a final output?

If so, my question is whether there is any reason why _n_restartsoptimizer is not parameterised?

Currently it's hard coded to 20 (our optimiser performs 20 iterations and I can see no other reference to this figure in my code, hence my logic at the top of this post), but I see no reason why we couldn't make this a default parameter value and allow users to specify their own number of iterations? Fairly simple fix I think and I'm happy to open a PR if anyone agrees?

till-m commented 1 year ago

Hi @hwrightson,

I think you might be confusing two things:

Let me know if this helps.

hwrightson commented 1 year ago

Hi @till-m many thanks for the quick response! Much appreciated.

Looks like I completely misconstrued what was going on in my pipeline, thank you for the pointers, I think I've got a better idea of what's going on now. I'll close the issue as you've answered my question 👍

All the best, H