one thing I could do (make pull req for this) is simply compute pca on the n vector space and then truncate
However pca has complexity of O(ND x MIN(N, D) + D^3) for an NxD matrix. Therefore, it's faster to binary search and do certain things (within reason). After fixed code, create edge case where if size of n, d big enough then just compute pca on the whole thing
(however note that
300^2 >>> 150^2 + 75^2 + 38^2 + ... + 1^2
one thing I could do (make pull req for this) is simply compute pca on the n vector space and then truncate However pca has complexity of O(ND x MIN(N, D) + D^3) for an NxD matrix. Therefore, it's faster to binary search and do certain things (within reason). After fixed code, create edge case where if size of n, d big enough then just compute pca on the whole thing (however note that 300^2 >>> 150^2 + 75^2 + 38^2 + ... + 1^2