Timeline for Doing PCA with $m$ vectors in $d$ dimensions and then plotting only $n$ vectors, when $n<d<m$
Current License: CC BY-SA 3.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 31, 2017 at 9:13 | comment | added | z80crew | @amoeba Thanks for improving the title. I think the very convenient api of the matplotlib PCA implementation lead me into a wrong direction. It not only calculates the new coordinate system, but projects all the input vectors accordingly. But as I did not need all (2,000,000) input vectors projected, I just used N vectors I wanted to plot as input vectors. Now I've learned that the correct way would be to do the PCA transformation based on as much input as my computer can handle and then project the vectors I want to plot according to the new coordinate system. | |
Jan 31, 2017 at 9:04 | comment | added | z80crew | @gung I know how PCA works, but thank for the interesting link nonetheless. I have to admit I used PCA here just as a simple MDS solution without thinking what that would mean in that case. | |
Jan 30, 2017 at 19:46 | history | edited | amoeba | CC BY-SA 3.0 |
edited tags; edited title
|
Jan 30, 2017 at 19:44 | comment | added | amoeba | OK, thanks, your question is clearer now, but I still do not understand why you can't do PCA on all your MxD data, and then plot only N vectors. | |
Jan 30, 2017 at 18:12 | history | reopened |
gung - Reinstate Monica whuber♦ |
||
Jan 30, 2017 at 17:44 | comment | added | gung - Reinstate Monica | This question isn't entirely clear to me, but I think this is based in a confusion about what happens in a PCA when p<N & why. It may help to read my answer here: Why are there only n−1 principal components for n data points if the number of dimensions is larger or equal than n?, which addresses the issue in a highly simplified way. | |
Jan 30, 2017 at 17:33 | vote | accept | z80crew | ||
Jan 30, 2017 at 16:46 | review | Reopen votes | |||
Jan 30, 2017 at 18:12 | |||||
Jan 30, 2017 at 16:29 | comment | added | z80crew |
@amoeba Updated my question. I guess it was a bad idea to use N for the number of vectors to plot, not for the number of all vectors ...
|
|
Jan 30, 2017 at 16:28 | history | edited | z80crew | CC BY-SA 3.0 |
added some clarification
|
Jan 30, 2017 at 16:11 | comment | added | z80crew |
@amoeba I'm referring to matplotlib.mlab.PCA , which is documented here. As it's documented on the matplotlib homepage under "The Matplolib API" I assumed it would be safe to call it "Matplotlib's PCA".
|
|
Jan 30, 2017 at 15:08 | history | closed |
Michael R. Chernick ttnphns amoeba whuber♦ |
Needs details or clarity | |
Jan 30, 2017 at 14:48 | answer | added | Conrad De Peuter | timeline score: 1 | |
Jan 30, 2017 at 14:13 | review | Close votes | |||
Jan 30, 2017 at 15:09 | |||||
Jan 30, 2017 at 14:08 | comment | added | z80crew |
Oh really? Matplotlib's PCA yields an error we assume data in a is organized with numrows>numcols and I came across several comments on Stackoverflow that suggested that this is a property of PCA and not just of the matplotlib implementation. So, it's just a matter of using another PCA implementation?
|
|
Jan 30, 2017 at 13:53 | review | First posts | |||
Jan 30, 2017 at 13:55 | |||||
Jan 30, 2017 at 13:49 | comment | added | ttnphns |
PCA just works when the number of vectors is bigger than the dimensions Not true statement. (Or please define what you mean by "works").
|
|
Jan 30, 2017 at 13:44 | history | asked | z80crew | CC BY-SA 3.0 |