I think our Pattern Recognition Class's homework is quite interesting, so I place my code here for sharing, please check.
Experiment 1 and experiment 2 used the dataset of mnist downloaded here http://yann.lecun.com/exdb/mnist/ .
We are required to implete PCA for decomposition the image from minist and then implete a Bayes Classifier for classification. Note that before Bayes classification, we first need to estimate the parameters of the projected distribution using maximum likelihood estimation. See how the dimension of the decomposed data and the independence between dimensions may affect the accuracy of classification.
The original slide in Chinese is here.
We are required to implete a Perceptron for classify any two of the ten digits from the projected data (After PCA).
The original slide in Chinese is here.