determinant of covariance matrix
Afficher commentaires plus anciens
We know that covariance matrix is a positive semi definite matrix and should have positive determinant. However, when dimensions are large, matlab command 'cov' is returning covariance with zero determinant. Can anybody please suggest a way to do away with this error?
Réponses (5)
Walter Roberson
le 24 Jan 2012
0 votes
Please see the discussion at http://www.mathworks.com/matlabcentral/answers/25130-invers-from-covariance-of-a-matrix-matrix
Honglei Chen
le 24 Jan 2012
0 votes
Maybe your data matrix has correlated components so the resulting covariance matrix is not full rank?
suran samanta
le 24 Jan 2012
0 votes
Honglei Chen
le 24 Jan 2012
0 votes
What you have is rank-deficient so the determinant will be 0. If you just want the algorithm to work, you can try to do the diagonal loading on your covariance matrix. However, I would suggest you to address the data issue as you are not getting a good estimates of covariance matrix anyway if your number of samples is less than the dimension of data. The rule of thumb is that the number of samples should be at least twice the number of data dimensions if I remember it correctly.
suran samanta
le 25 Jan 2012
0 votes
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!