Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: fmincon Hessian is not a square matrix
Replies: 3   Last Post: Aug 8, 2013 9:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Alan Weiss

Posts: 1,259
Registered: 11/27/08
Re: fmincon Hessian is not a square matrix
Posted: Aug 8, 2013 8:47 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 8/8/2013 7:23 AM, Olga Petrik wrote:
> Hi,
> I optimize a function with 157 parameters using fmincon and the result
> hessian is not a square matrix but just a vector of 157 elements (some
> of them are zeros and some are not). The diagnostic info for the
> optimization is:
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> Diagnostic Information Number of variables: 157
>
> Functions Objective: optimfcnchk/checkfun
> Gradient: finite-differencing
> Hessian: finite-differencing (or
> Quasi-Newton)
>
> Algorithm selected
> medium-scale: Quasi-Newton line search
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> Is there any way to get the square hessian matrix? (as I would like to
> compute using it sigma=sqrt(diag(inv(hessian)))') Or should I choose
> different optimization algorithm? Thanks!


There are two points here. One is the returned Hessian should be a
157-by-157 matrix. Are you sure that it is just a 157-element vector?

The other is that fmincon generally does not give accurate Hessians, as
documented here:
http://www.mathworks.com/help/optim/ug/hessian.html#bsapedt
It appears that you are using the active-set algorithm, so read that
part of the description.

Alan Weiss
MATLAB mathematical toolbox documentation



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.