determinant of covariance matrix
Show older comments
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?
Answers (5)
Walter Roberson
on 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
on 24 Jan 2012
0 votes
Maybe your data matrix has correlated components so the resulting covariance matrix is not full rank?
suran samanta
on 24 Jan 2012
0 votes
Honglei Chen
on 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
on 25 Jan 2012
0 votes
Categories
Find more on Resizing and Reshaping Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!