Attempt at Java PCA (will probably be much too slow)