GlobalSearch and fmincon options
10 次查看(过去 30 天)
显示 更早的评论
I use GlobalSearch for minizing a function. I use fmincon as the solver. Does using fmincon as the solver mean that I can make use of all options available for fmincon when using GlobalSearch. I wanted to make use of the option 'FunValCheck' using the options specification as
options = optimset('GradObj','off','MaxFunEvals',10000,'Display','on','DerivativeCheck','off','Algorithm','sqp','TolFun',1e-9,'TolX',1e-9,'Display','iter','FunValCheck','on');
However, in this case I do not obtain the vector of parameters minimizing the function, which I call theta_hat. I get what is below, whereas if I do not use 'FunValCheck' I obtain the theta_hat.
Num Pts Best Current Threshold Local Local
Analyzed F-count f(x) Penalty Penalty f(x) exitflag Procedure
Iter Func-count Fval Feasibility Step Length Norm of First-order
step optimality
0 6 2.635536e+05 0.000e+00 1.000e+00 0.000e+00 8.771e+05
0 6 -10 Initial Point
GlobalSearch encountered failures in the user provided functions.
The local solver ran once and it failed in a user supplied function.
ans =
263553.581516057
theta_hat =
[]
1 个评论
Alan Weiss
2021-9-6
I do not understand what you are trying to do by using the FunValCheck option. Please explain why you want to use it, what you hope to accomplish.
Alan Weiss
MATLAB mathematical toolbox documentation
回答(1 个)
Matt J
2021-9-6
The FunValCheck option is intended to abort the optimization if your objective function code does not return a valid value. It appears that that has occurred, just as it was designed.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Global or Multiple Starting Point Search 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!