After resuming Bayesian optimization, the next sampling point is not the 'NextPoint' in the previous optimization results

2 views (last 30 days)
Hello everyone.
I'm using bayesopt's 'resume' function to resume a previously ended Bayesian optimization(bayesopt). Here I use matlab2023a to calculate. The example adapts from the following link: https://ww2.mathworks.cn/help/stats/bayesianoptimization.resume.html
First, I performed 30 iterations and got the result which called 'results'. After resuming Bayesian optimization, I found that the sampling point to be evaluated immediately was not the variable 'NextPoint' in 'results', which means that the optimization did not continue according to the previous result. That is to say, performing 60 iterations at one time is different from performing 30 iterations first, and then using resume to continue 30 iterations. What is the reason for this phenomenon? Is there any good way to resume sampling from variable 'NextPoint' in last optimization result?
The codes I used are as follows:
x1 = optimizableVariable('x1',[-5,5]);
x2 = optimizableVariable('x2',[-5,5]);
vars = [x1,x2];
fun = @rosenbrocks;
rng default
results = bayesopt(fun,vars,'Verbose',0,'MaxObjectiveEvaluations',30,...
'AcquisitionFunctionName','expected-improvement-plus','IsObjectiveDeterministic',true,'PlotFcn',[]);
results.NextPoint
ans = 1×2 table
x1 x2 ________ _______ -0.28356 0.11953
newresults = resume(results,'IsObjectiveDeterministic',true,'MaxObjectiveEvaluations',30,'PlotFcn',[]);
newresults.XTrace(31,:)
ans = 1×2 table
x1 x2 ________ _______ -0.28206 0.11514
function f = rosenbrocks(x)
f = 100*(x.x2 - x.x1^2)^2 + (1 - x.x1)^2;
end
As we can see from the above results,after using 'resume',the X point to evalate immediately is not same as the 'Nextpoint' in the 'results'.
  2 Comments
Alan Weiss
Alan Weiss on 3 Aug 2023
I do not know the answer to your question. I have tried asking some other member of the development staff, but vacations abound right now. I hope that you will get an answer within a few weeks.
Alan Weiss
MATLAB mathematical toolbox documentation

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!