필터 지우기
필터 지우기

Specify initial points (both variable and objective function) in surrogateopt function for some data

조회 수: 5 (최근 30일)
Hello,
I would like to add some initial data (which are from previous run of the objective function) to surrogateopt to reduce the computation time. The objective function have 4 variable. I have 100 previously run data of the objective function.
Below is a simple example of the code:
objconstr = @(x)(x(:,1)^2+x(:,2)^2+x(:,3)^2+x(:,4)^2);
LB = [-2,-6, -3, -5];
UB = -LB;
options = optimoptions('surrogateopt','PlotFcn');
x0=[0 0 0 0;
1 1 1 1;
......
];
%Results of objective function for the x0 values
y0=[1 3 4 5 ....]
[x,fval,exitflag,output] = surrogateopt(objconstr,LB,UB,options)
  댓글 수: 2
Torsten
Torsten 2023년 8월 10일
편집: Torsten 2023년 8월 10일
I would like to add some initial data (which are from previous run of the objective function) to surrogateopt to reduce the computation time.
Did you read somewhere that such an option exists ? I cannot find it.
Mohammad Azadi Tabar
Mohammad Azadi Tabar 2023년 8월 10일
편집: Mohammad Azadi Tabar 2023년 8월 10일
Hello,
Yes, I did and found the answer.
trials.X=x0;
trials.Fval=y0;
% options.InitialPoints = trials;
options = optimoptions('surrogateopt','PlotFcn','surrogateoptplot',...
'MinSampleDistance',1e-02,...
'MaxFunctionEvaluations',10,'InitialPoints', trials);
[x,fval,exitflag,output] = surrogateopt(objconstr,LB,UB,options)

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surrogate Optimization에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by