Measuring the Hessian matrix for lsqnonlin
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello
I am optimising a multiobjective function using the lsqnonlin function with the trust-region reflective algorithm.
I was wondering how I can get the hessian matrix as an output?
Is it possible to calculate it using the Jacobian matrix at the optimum solution that lsnqnonlin provides?
Thanks
0 commentaires
Réponses (1)
Nipun
le 4 Juin 2024
Hi SM,
I understand that you are optimizing a multiobjective function using the lsqnonlin function with the trust-region reflective algorithm and are interested in obtaining the Hessian matrix at the optimum solution.
It is possible to estimate the Hessian from the Jacobian matrix at the optimum, especially when using the trust-region reflective algorithm.
Here is one way to calculate this approximation in MATLAB after running lsqnonlin:
% Assuming 'fun' is your function and 'x0' is your initial guess
options = optimoptions('lsqnonlin', 'Algorithm', 'trust-region-reflective', 'Jacobian','on', 'Display','final');
[x,resnorm,residual,exitflag,output,lambda,jacobian] = lsqnonlin(fun,x0,[],[],options);
% Approximating the Hessian from the Jacobian
Hessian_approx = jacobian'*jacobian;
This approach gives you an approximation of the Hessian based on the Jacobian provided by lsqnonlin. Please note that this is a simplification and may not capture the full curvature of your objective function, especially if the residuals are significantly non-linear in the region of interest.
Refer to the following MathWorks documentation on "lsqnonlin" function in MATLAB:
Hope this helps.
Regards,
Nipun
0 commentaires
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!