Face recognition with PCA

Now let's apply PCA to a face recognition problem. Face recognition is the supervised classification task of identifying a person from an image of his or her face. In this example, we will use a dataset called Our Database of Faces from AT&T Laboratories Cambridge. The dataset contains 10 images of each of 40 people. The images were created under different lighting conditions, and the subjects varied their facial expressions. The images are grayscale and in pixels. The following is an example image:

While these images are small, a feature vector that encodes the intensity of every pixel will have 10,304 dimensions. ...

Get Mastering Machine Learning with scikit-learn - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.