-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
TruncatedSVD by eigh #2572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, @mblondel I would like / am working on this issue. I played with the current implementation of truncatedSVD, using a few examples, given in the research papers, If I am right, you would like to have a new algorithm "eigh" for finding the SVD decomposition of X? Any specific pointers, before I actually start coding on this and submit a PR within 2-3 days? |
Nope, only the right singular vectors. |
We have this already.
(http://docs.scipy.org/doc/scipy/reference/generated/scipy.sparse.linalg.svds.html) |
Thanks I didn't know that. If we only need the right singular vectors, it seems that |
I'm not sure what you mean; we always want both the components and the reduced |
I think I got confused by this comment: |
That was actually supposed to be a TODO: find out if there's any case where doing |
Shall we close this issue? |
I guess so. We could add the following comment:
|
The right singular vectors of
X
can be computed by the eigenvalue decomposition ofnp.dot(X.T, X)
. So ifn_features
is not too large (say < 1000), this could be an efficient solver forTruncatedSVD
.Likewise, if
n_samples << n_features
, the left singular vectors could be obtained by the eigenvalue decomposition ofnp.dot(X, X.T)
but then we would only be able to implementfit_transform
, nottransform
.See http://en.wikipedia.org/wiki/Singular_value_decomposition
The text was updated successfully, but these errors were encountered: