[SciPy-User] qr decompostion gives negative q, r ?
Tue Nov 20 18:48:35 CST 2012
On Tue, Nov 20, 2012 at 5:36 PM, Virgil Stokes <email@example.com> wrote:
> Using np.linalg.qr(A) I get the following for R (3x3) which is
> "square-root" of the covariance matrix:
> array([[ -1.00124922e+03, 4.99289918e+00, 0.00000000e+00],
> [ 0.00000000e+00, -1.00033071e+02, 5.62045938e-04],
> [ 0.00000000e+00, 0.00000000e+00, -9.98419272e-03]])
> which is clearly not PD, since the it's 3 eigenvalues (diagonal
> elements) are all negative.
But why you expect R to be PD? The QR decomposition  is
A = QR with Q^T Q = I and R upper diagonal.
More information about the SciPy-User