[SciPy-User] linear algebra: quadratic forms without linalg.inv

josef.pktd@gmai... josef.pktd@gmai...
Sun Nov 1 23:55:42 CST 2009


On Mon, Nov 2, 2009 at 1:19 AM, Robert Kern <robert.kern@gmail.com> wrote:
> On Mon, Nov 2, 2009 at 00:15,  <josef.pktd@gmail.com> wrote:
>> On Mon, Nov 2, 2009 at 12:33 AM, Sturla Molden <sturla@molden.no> wrote:
>>> josef.pktd@gmail.com skrev:
>>>> if we have enough multicollinearity that numerical
>>>> precision matters, then we are screwed anyway and have to rethink the
>>>> data analysis or the model, or do a pca.
>>>>
>>>>
>>> And PCA has nothing to do with SVD, right?
>>
>>> Or ... what what would you call a procesure that takes your data,
>>> subtracts the mean, and does an SVD?
>>
>> All the explanations I read where in terms of eigenvalue decomposition
>> and not with SVD.
>
> Eigenvalues of the covariance matrix. The SVD gives you eigenvalues of
> the covariance matrix directly from the demeaned data matrix without
> explicitly forming the covariance matrix.

Good, I didn't realize this when I worked on the eig and svd versions of
the pca. In a similar way, I was initially puzzled that pinv can be used
on the data matrix or on the covariance matrix (only the latter I have seen
in books).

I will go back to do my homework, I just saw that numpy.linalg.pinv
directly works with the svd. I never read the source of the linalgs, because
I thought they are just direct calls to Lapack and Blas.

Josef


>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list