supplied Hessian of fmincon
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
Andrew Newell
2011 年 4 月 3 日
@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?
採用された回答
Steve Grikschat
2011 年 4 月 18 日
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 件のコメント
Steve Grikschat
2011 年 4 月 22 日
That's understandable. Maybe it should be called an "iteration matrix" or some other term to avoid confusion.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!