Java PCA transformation library

I wrote a Java library implementing Principal Component Analysis data transformation. About two years ago I needed such an algorithm implemented in Java and I was not able to find one, hence this library.

I assume that you use the whitening transformation. In such case, the transformation from the original space to transformed space is Z = X V D^{-1/2}, where X is the original data matrix (data points correspond to rows), V is the eigenvectors matrix (eigenvectors correspond to columns), D is the diagonal matrix with eigenvalues on the diagonal, Z is the transformed data matrix (data points correspond to rows). The reverse transformation (that will get you the original vector only if the number of dimensions hasn’t been reduced) is X = Z D^{1/2} V^{-1} = Z D^{1/2} V^T (see e.g. http://stats.stackexchange.com/a/229093/43697 for an explanation for a version with the rotation transformation).

In that context, I can see two problems with your code: it has swapped indexes when iterating over the `pca.getEigenvectorsMatrix()` (i.e., the V matrix) and is missing square root when handling the eigenvalue.