@karlnapf AFAIK eigenvalue decomposition and SVD have their own advantages one is order N^3 and other is order D^3 . So its better to implement both. I will confirm this with references.

The 2 cases make sense. Actually when D>N, PCA gives meaningful results for target dimensions less than N because rest eigenvalues are 0. I plan on adding a REQUIRE condition on target_dims to check if this constraint is satisfied.