How can I turn off the automatic plotting when using bayesopt

조회 수: 10 (최근 30일)
Shichao Zhou
Shichao Zhou 2018년 12월 25일
댓글: Shichao Zhou 2018년 12월 26일
I used the bayesopt to help me obtain proper hyperparameters of SVM. However, since many different SVMs are needed, the bayesopt is called in a loop, like
for i = 1 : N
...
results = bayesopt(minfn,[sigma,box],'IsObjectiveDeterministic',true,...
'AcquisitionFunctionName','expected-improvement-plus', 'Verbose',0);
...
end
Thus the automatic plotting by the function baysopt is undesirable. And I also think it made the run time of the code longer, did it?
I have faild to find any input argument to handle this. Here I paste the code fragment in BayesianOptimization that is related:
function this = runSerial(this)
...
this = callPlotFcn(this, 'initial');
...
while ~optimizationFinished(this, iteration)
% Maybe print verbose line
...
% Do a function evaluation and record results
...
% Choose next point
% Update timing, plots and output
end
...
this = callPlotFcn(this, 'done');
...
end
Can I just prevent the Class from calling "callPlotFcn"?

채택된 답변

Stephan
Stephan 2018년 12월 25일
Hi,
see this link to change the behavior of plot. For your purpose:
'PlotFcn', []
should work.
See also the Verbose option to get rid of the text messages / tables.
Best regards
Stephan
  댓글 수: 1
Shichao Zhou
Shichao Zhou 2018년 12월 26일
Thank you very much. I didn't read the document carefully. I noticed "Verbose" but missed "PlotFcn". Thank you again for your help..

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Model Building and Assessment에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by