[SciPy-user] negative values in diagonal of covariance matrix
Pauli Virtanen
pav@iki...
Thu Dec 11 14:06:15 CST 2008
Thu, 11 Dec 2008 10:57:37 -0500, josef.pktd wrote:
[clip]
> But, the negative diagonal elements means that the underlying Hessian or
> its approximation is not positive-definite. The inverse of a real
> symmetric positive definite matrix should have positive diagonal
> elements.
>
> So, I'm also pretty sure that the the optimization did not converge to a
> minimum, so I would either redefine the optimization problem or choose a
> more robust optimization algorithm.
Ideally, the algorithm should be robust enough to know that it didn't
converge in this case, and signal failure (success > 4). leastsq is a
wrapper to MINPACK's LMDER, so this is not completely straightforward to
debug.
--
Pauli Virtanen
More information about the SciPy-user
mailing list