PCA and Bayes

Fix some code