
In MATLAB (if A is sparse) R = qr(A) computes a Qless QR decomposition and returns the upper triangular factor R.
Does Math.NET Numerics support this Qless decomposition for sparse matrices?
Regards,
Oliver


Coordinator
Dec 5, 2013 at 9:28 PM

Hi Oliver
Not as part of our QR decomposition implementation. But as indicated in the
MATLAB QR reference the triangular factor R can also be computed with the Cholesky decomposition:
R = chol(A'*A) , which is more efficient especially if the matrix is very tall. Although note that in Math.NET Numerics the Cholesky decomposition provides the lower triangular factor, not the upper one, hence:
var R = A.TransposeThisAndMultiply(A).Cholesky().Factor.Transpose(); . Also note that since the QR decomposition is not unique, some rows can be negative the corresponding one of the Cholesky factor.
Then, other than the iterative solvers, all these direct solvers like Cholesky and QR are currently only optimized for dense matrices, so until we make progress on sparse direct solvers it may actually be faster to use dense matrices even if the data is very
sparse, especially if you can use the MKL native provider.
Thanks,
Christoph

