BRAGA

02 Writing02-02 Notes02-02-435

Residual Error (Truncated Eigenvalues)

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
∑j=k+1dλj\displaystyle \sum_{j=k+1}^{d} \lambda_j
(1)

We are working on PCA residual error under the standard covariance-eigendecomposition setup, where the eigenvalues satisfy λ1≥λ2≥⋯≥λd≥0\lambda_1 \ge \lambda_2 \ge \dots \ge \lambda_d \ge 0, and we keep only the first kk principal components. The canonical residual variance is

∑j=k+1dλj,\sum_{j=k+1}^{d} \lambda_j,
(2)

which measures the variance not captured by the retained kk-dimensional representation.

Deep Breakdown

Residual error in PCA, using truncated eigenvalues, is the amount of variance left unexplained after reducing a dd-dimensional dataset to its first kk principal components. The inputs are the ordered PCA eigenvalues λ1,λ2,…,λd\lambda_1, \lambda_2, \dots, \lambda_d, and the chosen number of retained components kk.

The output is a single non-negative scalar:

Residual Variance=∑j=k+1dλj\text{Residual Variance} = \sum_{j=k+1}^{d} \lambda_j
(3)

This quantity matters because PCA is fundamentally a compression method. When we compress data from dd dimensions down to kk 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:

  1. Reconstruction: lower residual variance usually means better reconstruction from the retained components.
  2. Low-rank approximation: PCA gives the best rank-kk approximation in squared-error sense.
  3. Explained variance ratio: if the retained variance is ∑j=1kλj\sum_{j=1}^{k}\lambda_j, 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 kk PCs keep,
  • residual variance = what the truncation throws away. ---

Flowchart

Centered datamatrix XComputecovariancematrix or SVDObtain orderedeigenvalues λ1 ≥λ2 ≥ ... ≥ λdChoose numberof retainedcomponents kKeep first keigenvaluesDiscardeigenvaluesλ(k+1) to λdSum discardedeigenvaluesResidualvariance = Σfrom j=k+1 to dof λjInterpret asinformation lostUse forchoosing k,compression,reconstructionquality

#machine-learning#machine-learning-algorithms#dimensionality-reduction-principal-component-analysis-pca

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close