1
$\begingroup$

I have a multi-dimensional (~600dim) sample from which I determine its covariance matrix. The determinate of the covariance is 0. The sample does not show strong correlations when plotting 2 dimensions.

Now I would like to define a equivalent multivariate Gaussian model. However, in the probability, there is the ${|\Sigma|}^{-{1\over2}}$ term, which is undefined for me.

I don't understand -- an uncorrelated Gaussian should still have a proper probability distribution, right?

Can it be that the determinate of the covariance is 0? Maybe it is a numerical problem computing the covariance of so many dimension?

$\endgroup$
  • $\begingroup$ Perhaps some of the variables are so closely related that they create a collinearity problem? $\endgroup$ – hejseb Sep 24 '13 at 11:24
  • $\begingroup$ Sorry; no entries of the correlation matrix are 1. $\endgroup$ – j13r Sep 24 '13 at 11:45
1
$\begingroup$

It's a numerical issue of computing the determinate of a high-dimensional matrix. I was able to solve it using the code in https://www.mathworks.de/matlabcentral/fileexchange/22026-safe-computation-of-logarithm-determinat-of-large-matrix

p, l, u = scipy.linalg.lu(cov)
du = u.diagonal()
c = numpy.linalg.det(p) * numpy.prod(numpy.sign(du))
logdet = log(c) + log(numpy.abs(du)).sum()
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.