I remember a recent post where @weefuzzy shared a bit of code to calculate the total variance for the PCA. [but discourse search is not helpful to bring that post back to me… thus starting a new topic]
I have a standardized dataset. I’m now first running a pca @numdimensions 2. Then I’m running Owens calculation to figure out, how many dimensions I need to keep 80% of my data. Then I’m running a further pca with that many dimensions.
Is there a more efficient way to do this? Would an argument to PCA be possible where we don’t specify the number of dimensions, rather the variance we are aiming for?
Sorry if I’m missing something obvious here.
Thanks, Hans
1 Like
----------begin_max5_patcher----------
5504.3oc6ckziiibk9bV+JDDl4zjVSrxHBCev8L.imKMfAlCCLZXjfRhYVra
JQARppptMb8a2wBIEoDWURxL6pdYAnTEWi2W78Vik7e7gGVuM9KAoqW8GW8S
qd3g+wGd3A6gLG3g7++CqO3+kcQ9o1Ka8wfOGu8mW+n6TYAeIyd3rUaWss3n
wmyhBxx90SAtm75s9GeY8i4+d0eO+xB2auU8i6OHoE26wyGBOpua6aCe4ftm
o8nj7idxOa2GCO9xSIA6xbuIgGeC5wUXDwy7ag8+QvaPq96l64e9gOX93wAJ
qGBRS8eI3Fg8TR3wrVE1lEPRiBHoQAD2t.JMBiQ.4RyuonWk.1Rm4ojfSAG2
uR2p1GdH3XZX7wzQJunQzg1g7JvJiDJkTqXSTyg7lnaKAqdNLKKw+X5ywIGZ
WXerEAVfFQG7PXvHxFrhynROjhxvdTuGWoHyBetpju5zN+MoY6s+NIX+4cA6
KtAMuHM3XlellO7TT3wfcwmOlUUfFF4PTps+b7wrzveyd0XSWbGPn4ZO5evd
sq+gjP+n0ikMwcFDTX1FtRI4TNl6Q3Z3VwrHKcZIVOGcNb+l89Y9oAYesIHs
USkOGE6m0NaiMFDDORDj1NBpnhMRgFwTddaTJOAhYwPlRnQQO77ghZv6qshZ
QgoYC.0DuQnVtUrlvLm59TCYV2wC0gbWNl8jivNNsKMOq+JAR3bagmECYnMx
w4lxSLMtky6fEBzFNgSUJrTvnTtVQQ6xhOGtn0gfr5u9e+Cat3gdi198FI5e
ecCxIaDcinNB+PyfM1KK7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veuz3PskQw82
3bk0yXybDHeuVKaxDSu69iSh.kFbbe56MOqY9oYAOeNJJeycd3HcWaTtshzp
xgpvqzZqYzSDx4PnFsLQzFjc+4WhVh4ThhpjuFY5Mu5setuRiahZ5Y+cElep
3TcX+cP4UuM6R5NuHRYkdIk.FI22oQSu1isPr+oUq+gD632bGnn8ItdWjeZp
44kdJGcVapy2G9me3eEo9glI
-----------end_max5_patcher-----------
My understanding is that PCA is deterministic, so the results from your second step there would be the same as the first step if you just kept however many dimensions it took to get 80%.
Yes, but how would I know the number of dimensions to keep 80% without calculating the first step?
The two successive pca processes work nicely in tandem. I’m just musing about efficiency and whether it would be technically possible to tell PCA upfront to keep 80%, instead of specifying the numdimensions.
IIUC, it would do the same loop that you are doing under the hood…
I agree that this could be a useful interface option. Internally, not sure how I’d make it work yet, but I’ll squirrel it away in my desiderata bucket. Meanwhile though, you can avoid the second PCA by grabbing all the columns to start with, finding out how many you actually want, and then just ditching the excess with fluid.datasetquery
----------begin_max5_patcher----------
5980.3oc6cs0aiijc94t+UPXrAIAwiRcuXMHOraBP17x.r.4gffAKLnknsYO
ThJjT8kYw1+1ScgThTl2EIcOSebCXqljEqy4Temq0E82d+6t6wjOGlcm2O58
ydu6c+s2+t2Yuj4Buq3++t61G74swAY1G6tCgeJ4wOb28takG94b6ky8dz6w
xqd3z9jS4wg41lPJt5wf7suDc34GRC2l65RNcC+dOLkuAcuGGqL+gP1f79qE
sw8Zx+xwPWCt6wfCOe28E+87iEsyRDZB6GnrJTQzgRh.at1e+8u27q6GHqtM
Y+9vC4ulWeI7f21WRN5k7jm9+3kcJ8X7oLuOEk+h2tf7frv7+uSgoew6eJ5v
ObLNXa3+b4aIN5P31jSGruJZonIMLS2SA4QIGdnwmntHE0tHkJ8sBSlXCAwH
XgPQjBpvWKm4HysXxJB3pRN5hK4dJI0IvB9kPivKH84SlG7d8U9h2WRNk5Ec
33obuWBx7nHusIwY+n2yoAO58OFt2KHN1a0jiDqvhnkVRljS7o9BI1WR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patcher-----------
1 Like
thanks @weefuzzy for the in-place crop solution!
Just a quick comment that you might want to increase the list length for all zl objects in the variance calculation. I ran into surprises when my lists used many descriptors and grew beyond 256 items.