Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: fmincon Hessian is not a square matrix
Posted:
Aug 8, 2013 8:47 AM


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: finitedifferencing > Hessian: finitedifferencing (or > QuasiNewton) > > Algorithm selected > mediumscale: QuasiNewton 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 157by157 matrix. Are you sure that it is just a 157element 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 activeset algorithm, so read that part of the description.
Alan Weiss MATLAB mathematical toolbox documentation



