Implement kernel PCA and apply it to the Olivetti face database.
You are required to use MATLAB for this assignment.
You can download the dataset from the course homepage^{5}.

- Download the Olivetti face dataset. It contains 400 face images (10 images for each person and 40 people in total) of size 45 by 35.
- Normalize the image vectors to have zero mean.
- Implement kernel PCA with polynomial kernels
with
(see slides of the design practical).
- Calculate the classification error of a nearest neighbor algorithm applied to the images projected to the reduced space spanned by the first principle components. To classify an image of a person, that image is removed from the training set of (400-1) images and the projection matrix is computed. All the 400 images in the training set are projected to a reduced space using the computed projection matrix and recognition is performed based on a nearest neighbor algorithm (repeat this procedure for each image). Investigate the dependence of the classification error (for all images) on the number of principle components . Use the parameter values and .
- Repeat the previous steps and analyse the dependence of the classification error on the parameters and .
- Compare the results for kernel PCA with the corresponding results for (linear) PCA (set and ).