I have a covariance matrix which is not strict positive matrix, probably due to precision issue. gsl failed to decomposed it with "GSL error: matrix must be positive definite". Searched on the web a bit and only found R can compute the nearest positive definite matrix to an approximate one. My platform is Python, and does any one know any python library can compute the nearest positive definite matrix to an approximate one? Or any source code will be helpful.
Asked
Active
Viewed 335 times
2
-
1Thanks, it is very close to what I need, except that that function will return a conditioned matrix with unit diagonals, which is not what I want. – Hailiang Zhang Apr 27 '13 at 06:20