Is there any solution to make positive semi-definite covariance matrix?

조회 수: 4 (최근 30일)
I have image data. row of the data represents pixel and column represents rgb values. that is, the size of the data is N by 3. However, I would like to apply kmeans and GMM for clustering. But the covariance matrix is not positive semi-definite.
Why and what is solution?

채택된 답변

Walter Roberson
Walter Roberson 2016년 7월 5일
Covariance matrices of real variables are always positive semi-definite. See http://math.stackexchange.com/questions/114072/what-is-the-proof-that-covariance-matrices-are-always-semi-definite
If you calculated a covariance matrix but it is being reported as not positive semi-definite then you might have encountered numeric round-off. In such a case use
(X.' + X) / 2
in place of X: this will eliminate any round-off error that is keeping the matrix from being completely symmetric.
  댓글 수: 2
K M Ibrahim Khalilullah
K M Ibrahim Khalilullah 2016년 7월 5일
Thank you very much for your answer. would you tell me about X please? is the X data or covariance matrix?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by