Matlab: Get the Hessian matrix using Multistart
古いコメントを表示
I am using Multistart in Matlab with the `fmincon` command to estimate some parameters to my maximum likelihood function. The issue that I have with Multistart is that I can't get the Hessian matrix. It is easy to get the Hessian with `fmincon` but how to retrieve it using Multistart, I am absolutely clueless despite some explanation by MatWork here . They say:
"If you use GlobalSearch or MultiStart, your objective function can return derivatives (gradient, Jacobian, or Hessian). For details on how to include this syntax in your objective function, see Writing Objective Functions in the Optimization Toolbox documentation"
I tried to understand their documentation but still clueless.
Here's my current Multistart code:
options = optimset(options,'Algorithm','sqp','MaxFunEvals',10000,'MaxIter',10000);
problem = createOptimProblem('fmincon','objective', @(x)myfunc(x),'x0',initialparameter,'lb',[min],'ub',[max],'options',options);
ms = MultiStart('UseParallel','always','Display','iter','TolX',1e-8);
[x fval] = run(ms,problem,20);
Where in my code should I specify that I want to retrieve the Hessian? I tried `'Hessian','on'` in `optimset` but that didn't give me the Hessian matrix...
採用された回答
その他の回答 (2 件)
You cannot use the Hessian with the sqp algorithm option, only with interior point and trust-region-reflective. The Hessian computation is specified in different ways depending on the fmincon algorithm uses. You must choose a value for the Hessian option following the guidelines here,
カテゴリ
ヘルプ センター および File Exchange で Solver Outputs and Iterative Display についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!