Your results are a direct consequence of the properties of Principal Component Analysis (PCA) and the role of the mean in capturing the global structure of the dataset.
PCA is a linear dimensionality reduction technique that identifies the directions (principal components) in which the data varies the most. It projects the original high-dimensional data into a lower-dimensional subspace while trying to preserve as much variance as possible.
Role of the Mean in PCA:
-
Centering the Data: Before performing PCA, the data is usually centered by subtracting the mean of the dataset from each data point. This step is crucial as PCA looks for directions that maximize the variance (covariance structure). If the data is not centered, the first principal component might correspond to the mean of the data rather than a direction with meaningful variance.
-
Facilitating the Covariance Matrix: PCA involves calculating the covariance matrix which measures how each dimension varies with the others. The centering step ensures that the covariance matrix reflects the true covariance rather than being biased by the mean.
-
Removing the Bias: When data is centered, the resulting projection does not include the bias that is introduced by the global mean. This leads to a projection space where the principal components reflect genuine structural features and patterns in the facial images.
When reconstructing the original images from the low-dimensional subspace, the mean must be added back to the projection. This step is necessary because, during the PCA process, we moved the origin of the space to the mean of the data. By adding the mean back, we translate the data back to its original location in the high-dimensional space.
Observations from Reconstruction:
-
Effect of Maximum Number of Eigenfaces (PC=400): When you use all the eigenfaces (which equals the dimensionality of the original space), you essentially perform a lossless encoding and decoding procedure, assuming no information was lost in the PCA process. Therefore, the reconstructed faces are identical to the original ones.
-
Effect of Reduced Eigenfaces (PC=200 and PC=50): By using fewer principal components (eigenfaces), you reconstruct the images using only the directions in which the most variance is observed. With fewer components, you are discarding some information, specifically the variance explained by the omitted components. As such:
-
PC=200: You're capturing a substantial portion of the variance, so the reconstructed images are similar to the original but ever-so-slightly more blurry. This indicates that while you're capturing most of the important features, you're losing some details.
-
PC=50: You're using a much smaller number of eigenfaces, so you retain only the most significant features of the faces while losing many details. This leads to further blurriness and distortion, as the reconstruction now relies on just the major structures of the faces, such as the position and size of eyes, nose, and mouth.
Therefore, your observations are closely related to the number of principal components you're retaining for reconstruction and the need for mean adjustment during the PCA process. More principal components mean more details, and fewer principal components result in a more generalized and hence blurry or even distorted representation of the original images.
For optimal face image reconstruction, it is necessary to evaluate the trade-off between the number of eigenfaces used and the quality of the reconstructed images. Additionally, this demonstrates the importance of the mean face which holds the average structure of all faces in your dataset.