Termination criteria

64 views
Skip to first unread message

Andrea Scaglioni

unread,
May 7, 2018, 9:15:08 AM5/7/18
to BayesOpt discussion
Good afternoon,

Reading the documentation I noticed that the only termination criterion for BayesOpt is the number of iterations.
Recently, other stopping criteria were proposed for bayesian optimization algorithms (see https://arxiv.org/abs/1511.07827).
I wanted to test these new termination criteria without modifying the BayesOpt source code, so I was wondering if it exists a function to call externally (for instance, inside the body of the objective function) to terminate the execution.
I am referring to something similar to the "nlopt_force_stop" function in NLOpt (https://nlopt.readthedocs.io/en/latest/NLopt_Reference/).
Thanks in advance.

Best,
Andrea

Ruben Martinez-Cantin

unread,
May 21, 2018, 5:16:33 PM5/21/18
to BayesOpt discussion
Hi Andrea,

If you are using the C++ interface you can run the optimization loop
step by step. You can check the loop at the BayesOptBase::optimize
method.

// Initialize a new state
initializeOptimization();
}
for (size_t ii = mCurrentIter; ii < mParameters.n_iterations; ++ii)
{
stepOptimization();
}
bestPoint = getFinalResult();

Then, you can interrupt it whenever you want. In C++
initializeOptimization, stepOptimization and getFinalResult are all
public. Sadly, those methods are not available from other languages.

I'm not very fond of using termination criteria within Bayesian
optimization, but if you find it useful and you are willing to submit
a pull request, I'll be happy to include it in BayesOpt as an option.

Best,

Rubén
> --
> You received this message because you are subscribed to the Google Groups
> "BayesOpt discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to bayesopt-discus...@googlegroups.com.
> To post to this group, send email to bayesopt-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/bayesopt-discussion.
Reply all
Reply to author
Forward
0 new messages