Hello,
I am struggling with the fact that covariance matrices computed from a precision matrix aren't positive definite, according to `isposdef()` (they should be according to the maths).
It looks like the culprit is `inv(pd::Matrix)` which does not always result in a positive definite matrix if `pd` is one. This is probably because `inv()` is agnostic of the fact that the argument is positive definite, and numerical details.
Now I've tried to understand the support for special matrices, and I believe that `inv(factorize(Hermitian(pd)))` is the proper way to do this. Indeed the resulting matrix is positive definite. However, this computation takes a lot longer than inv(), about 5--6 times as slow. I would have expected that the extra symmetry would lead to a more efficient matrix inversion.
Is there something I'm doing wrong?
Cheers,
---david