completed extracting PCA from training data