-
Notifications
You must be signed in to change notification settings - Fork 208
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
plot PCA of transpose of matrix #496
Comments
@vivekbhr Do you still have the numpy file for this? |
@dpryan79 yes.. can share with you .. |
It looks like the following works (
That's among what |
I'm not sure SVD is really returning equivalent results to what R is doing in this case. I tried the above code on a play dataset and got reasonable results, but I only got nonsense on real data. This may well turn into a "can't implement without rewriting parts of numpy". I'll remove this from the 2.5 milestone, since I don't think it'll happen for that. |
for a different PCA implementation we will need to use sklearn or
statsmodels (or find out how they do the PCA).
…On Wed, Mar 29, 2017 at 8:42 AM, Devon Ryan ***@***.***> wrote:
I'm not sure SVD is really returning equivalent results to what R is doing
in this case. I tried the above code on a play dataset and got reasonable
results, but I only got nonsense on real data. This may well turn into a
"can't implement without rewriting parts of numpy". I'll remove this from
the 2.5 milestone, since I don't think it'll happen for that.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#496 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEu_1UDHCZAsmDvf1NNpfTJvsXiusEBXks5rqf1QgaJpZM4MoFs0>
.
--
Fidel Ramirez
|
I tried sklearn briefly but didn't get much better results. |
Here's the python code that seems to work correctly (
Each column of PCs is a principal component, with rows as samples. This matches with what R is doing. |
@vivekbhr There's now a |
I seem to now be getting the same results as |
plotPCA issue (not projecting the samples properly, #477 ) is fixed in R by using a transpose of matrix (scaling/centering is not required). But
matplotlib.mlab.PCA
doesn't accept a transposed matrix. We need to fix this issue.The text was updated successfully, but these errors were encountered: