1

So I'm trying to invert a big (449x449) covariance matrix, which is thus symmetric and positive definite. (What I'm trying to do is to invert this matrix as part of a Gaussian Process fitting for the Mauna Loa CO2 dataset.)

This inversion is pretty long, so I wanted to use chol2inv instead of solve. But the chol2inv method gives me a very strange result : a matrix very close to 0 (sum of it is equal to 10^(-13)).

Why would chol2inv give me this?

Richard Chambers
  • 16,643
  • 4
  • 81
  • 106
Mysterry
  • 233
  • 3
  • 10

1 Answers1

5

Sounds like you have wrongly used chol2inv. It takes the upper triangular Cholesky factor rather than the covariance matrix as input. So if A is your covariance matrix, you want

chol2inv(chol(A))

not

chol2inv(A)

Just found out that this issue was answered twice long long ago.

Zheyuan Li
  • 71,365
  • 17
  • 180
  • 248