3
$\begingroup$

I have a equation to solve $Ax = b$, where $A$ happens to be the precision matrix of a multivariate Gaussian distribution. I can use either direct solver or iterative solvers to get the $x$ vector. However, I also need to get the diagonal elements of the covariance matrix given by $A^{-1}$. I cannot directly invert the sparse precision matrix $A$ since the dimension is very high and its inverse will be full. It won't fit in memory. But I want to get the diagonal elements of the covariance matrix $A^{-1}$. How can I get it?

$\endgroup$
1
  • $\begingroup$ Is this related to your question here? stats.stackexchange.com/questions/57468/… In general are you totally positive that there isn't something you are trying solve? Usually getting $A^{-1}$ is a bit hard. If you try to replicate a paper you might as well mention it so we might be able to help more substantially. (Also try the scicomp.stackexchange.com you might be pleasantly surprised.) $\endgroup$
    – usεr11852
    Apr 28, 2013 at 3:48

1 Answer 1

1
$\begingroup$

Solving with $b =$ the $i$'th column of the identity matrix will make the resulting $x =$ the $i$'th column of the covariance matrix. Do that for $i = 1,\dots,n$, each time keeping only the $i$'th element of $x$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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