Contents
We are working on PCA Reconstruction, also called PCA decoding, with canonical formula , where is the centered data matrix, contains the first principal directions as orthonormal columns, and is the low-dimensional score matrix. The domain is standard PCA under centered numeric data, with orthonormal loading vectors, and the result is an approximation of centered in a rank- subspace.
Deep Breakdown
PCA reconstruction is the step that maps low-dimensional PCA scores back into the original feature space. In the encoding step, we compress the centered data matrix into scores using the first principal components. In the decoding step, we expand those scores back into a -dimensional approximation:
Because , reconstruction can also be written as:
This is not usually equal to the original centered matrix , unless or the data already lies exactly in the -dimensional principal subspace. Instead, it is the orthogonal projection of each observation onto the subspace spanned by the first principal directions.
Why this matters in DA/DS:
- Compression: store scores instead of original centered values when .
- Denoising: small-variance directions are often noise-dominated, so discarding them can smooth the signal.
- Interpretability: reconstruction lets us inspect what information is retained after dimension reduction.
- Error analysis: comparing and gives the residual matrix, which quantifies information loss.
Input:
- Centered data matrix
- PCA loading matrix Intermediate object:
- Score matrix Output:
- Reconstructed approximation A useful way to think about it: encoding moves points into a compressed coordinate system, decoding maps those compressed coordinates back into the original axes, but only within the retained PCA subspace.