Hessian in optimValues of fminunc
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Alexander Andreychenko
le 13 Fév 2016
Commenté : Alan Weiss
le 16 Fév 2016
Hello everyone! I have the function which I minimize with fminunc. So far, no problems with that. I have the analytical expression of the Hessian for my function. I want to be able to plot the conditional number of Hessian during the course of the optimization. Is there any way to pass the Hessian/its conditional number to outputFcn (via optimValues)?
0 commentaires
Réponse acceptée
Alan Weiss
le 16 Fév 2016
While I am not sure that I understand your question, it seems that you have an analytic expression for the Hessian you want to plot. The syntax of a cutom output function is
function stop = outfun(x,optimValues,state)
So you have the current point x available to your output function, meaning you can calculate the Hessian in your output function.
If I misunderstand what you are asking, please try again.
Alan Weiss
MATLAB mathematical toolbox documentation
2 commentaires
Alan Weiss
le 16 Fév 2016
Oh, I did not realize that what you were looking for was a way to avoid another calculation of the Hessian. It is possible that something along the lines of the nested function technique used in this documentation could save you from computing the Hessian twice.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Plus de réponses (0)
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!