Contents
We are working on PCA residual error under the standard covariance-eigendecomposition setup, where the eigenvalues satisfy , and we keep only the first principal components. The canonical residual variance is
which measures the variance not captured by the retained -dimensional representation.
Deep Breakdown
Residual error in PCA, using truncated eigenvalues, is the amount of variance left unexplained after reducing a -dimensional dataset to its first principal components. The inputs are the ordered PCA eigenvalues , and the chosen number of retained components .
The output is a single non-negative scalar:
This quantity matters because PCA is fundamentally a compression method. When we compress data from dimensions down to dimensions, we deliberately discard some directions of variation. The sum of the discarded eigenvalues tells us exactly how much total variance was lost. In DA/DS work, this is central when deciding how many components to keep. Too few components, and the compressed representation may miss important structure. Too many, and the reduction may not simplify the model enough. Residual error provides a direct tradeoff measure between compression and fidelity. This object is tightly linked to three core PCA ideas:
- Reconstruction: lower residual variance usually means better reconstruction from the retained components.
- Low-rank approximation: PCA gives the best rank- approximation in squared-error sense.
- Explained variance ratio: if the retained variance is , then the lost fraction is residual variance divided by total variance.
So, conceptually:
- total variance = what exists in the original centered data,
- retained variance = what the first PCs keep,
- residual variance = what the truncation throws away. ---