# Principal Component Analysis in Face Recognition - number of Eigenvalues?

I'm at the beginning of learning about the PCA as it is applied in the field of face recognition (Eigenface algorithm) and I came about the following question:

"You're using a training set of 80 images (150x150 pixels). After visualizing the Eigenvalues you decide to keep 40% of the Eigenvectors. What dimension do the resulting projected images (template) have?"

Now, since I think the number of Eigenvalues calculated from a data set is equal to the number of dimensions of that data set, I'd say you'd get images with 9000 dimensions because the dimension of the training images is 150x150=22500 and I'd keep 40% of those.

So is this assumtion correct? Or does the number of Eigenvalues differ from the dimension of the input images ?

Thank you, if you need clarification on the question, just ask.

Yes. That's correct. Although 40% of eigenvectors is not very meaningful. It's better to talk about how much variance is captured, i.e., the proportion of the sum of eigenvalues.

See Eckart–Young theorem to understand how eigenvalues related to reconstruction error.

• Okay thank you for confirming that. I know this percentage is not really representative but this was a question from the learning documents I was going through. From what I've learned (and feel free to correct me if I'm wrong here), you can't simply assume a uniform percentage of eigenvectors to keep but you have to first look at the results and determine how many eigenvectors you can keep until the results are irrelevant enough to be neglected. – slagjoeyoco Sep 14 '13 at 19:59
• I updated the answer. Eckart–Young theorem should give you more intuition on how truncating eigenvalues relate to your problem. – Memming Sep 15 '13 at 14:15
• thank you again for helping me understand this problem better! – slagjoeyoco Sep 15 '13 at 18:38

You might want to consider reading this paper. I found it very helpful when I was first introduced to PCA.

http://www.snl.salk.edu/~shlens/pca.pdf

• thank you for the hint I'll look into it. – slagjoeyoco Sep 14 '13 at 19:53

Not sure but I think the number of eigenvalues or eigenvectors you get is dependent on the number of images so it would be 0.4 * 80 = 32 of them. The images are "flattened" so you do the covariance and then eigenvector/eigenvalue calcultions on an array that has 80 rows and 150*150 columns so you end up with a square symmetric covariance matrix that is 80 by 80, then do the eigen calculations on that matrix to get a maximum of 80 eigenvectors/eigenvalues.