I've read a lot about how PCA is used to reduce the dimensionality of data, including this great answer and this mathy post. But I'm unclear what this does when applied to image data?
For example, given a set of vectors from images of faces, I could reduce the dimensions:
pca = PCA(n_components=100, svd_solver='randomized', whiten=True)
pca.fit(faces)
compressed = pca.transform(faces)
But when I look at the results, I see nothing like an image:
example = compressed[0]
example *= 255.0
example = example.astype('uint8')
example = example.reshape((10,10))
output = Image.fromarray(example)
output = output.resize((200,200))
output.save('ExamplePCA.jpg')
Can someone describe for me (someone with limited matrix math/linear algebra knowledge) what is being represented here?