# How to get error estimates using TDecompsparse

Hi all,
This may be a naive question, since I am new to using sparse matrix class.
anyhow I would like to use TDecomsparse to solve for a very large sparse matrix.
However, I couldn’t figure out how to estimate the errors or the covariance matrix
from the solution.
Is there something like the Numerical recipies routine linbcg?
Thanks

Hi,

You have to be clearer. You want to invert a sparse matrix. Then you
talk about a (positive-definite) covariant matrix and error estimates ??

-Eddy

Thanks Eddy,
We want to solve a (linear) matrix equation fo the form Ax=b. Until recently we were using
Singular value decomposition to do this (more specifically TDecompSVD)
This also gave us the covariance matrix (discussed in Numerical recipies) using the
decomposed U and V.
However svd solver does not scale well with the size of the matrix. The size of the matrix
we were trying to solve is of the size 7000 x (7000 choose 2). The memory used by TDecompsvd
is more than 15G.
since matrix A was sparse, I thought of using sparse matrix solvers to do this.
But its not obvious to me how to get the covariance matrix if I use TDecompSparse.
(but obviously first time I am trying to use sparse matrix solvers in ROOT, so may have missed something simple and I should use something else)
Thanks in advance for any help.

Also another fundamental limitation of TSparseDecompose is that the matrix needs to be symmetric.
(whereas in my case its not). Are there generalized matrix solvers in ROOT which scale well
for very large matrices which are close to singular?
Thanks