supplied Hessian of fmincon
3 views (last 30 days)
Show older comments
Hi,
I have a question and would be happy if anyone can answer. I have a simple optimization problem with only 2 variables and 2 equality constraints. When I compare the Hessian of the Lagrangian function computed by hand with that supplied by fmincon, I observe a huge difference. I know that fmincon uses the SQP algorithm and the BFGS formula to compute the Hessian and this Hessian is an approximation to the Hessian of Lagrangian. However, since this is an approximation, it seems to be close to the accurate value.
Please see the difference :
Hessian provided by fmincon =
[2.2313 8.7213
8.7213 60.3726]
Hessian solved by hand =
[-0.3666 0
0 -0.0046]
Please note that the optimal value for x and obj function are same just different in Hessian. I got the same thing for another problem. I am wondering what this difference is for?
Thanks in advance, Mary
2 Comments
Andrew Newell
on 3 Apr 2011
@Mary, how can we know the reason if you don't tell us what the function is and how you are calculating the Hessian by hand?
Accepted Answer
Steve Grikschat
on 18 Apr 2011
As you stated, fmincon provides a BFGS approximation to the Hessian of the Lagrangian. However, the BFGS matrix is a positive definite matrix based on the local curvature of the problem.
But note, it's always positive definite and your Hessian (from the looks of it) is not necessarily so. This matrix should not be used for any comparisons or computations outside of the optimization.
2 Comments
Steve Grikschat
on 22 Apr 2011
That's understandable. Maybe it should be called an "iteration matrix" or some other term to avoid confusion.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!