[SciPy-User] linalg question:cholesky for semidefinite, or LDL, QR equivalent for squared matrix

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Apr 29 14:35:29 EDT 2015


https://github.com/numpy/numpy/pull/4079

I'm looking for the equivalent of Cholesky for possibly singular, symmetric
matrices using numpy or scipy linalg.

details:
I'm writing a function that can either take the data x (nobs, k_vars) or
the moment matrix x.T.dot(x) (k_vars, k_vars), and I want to get the same
result in both cases.

Given data x, all I need is the R of the QR decomposition.
If the moment matrix is not singular, then I can get the same with the
Cholesky decomposition.

However, what's the equivalent of R in QR if x is not of full rank and the
moment matrix is singular?

QR on the moment matrix gives different numbers and I don't know how to
recover the correct R.


requirement: I need the same sequential decomposition as qr and cholesky to
be used for sequential least squares.

Thanks,

Josef
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20150429/03144c7b/attachment.html>


More information about the SciPy-User mailing list