BRAGA

02 Writing02-02 Notes02-02-434

Reconstruction (Decoding)

Published 16 Apr 20262 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
Xrecon=ZVk⊤=XVkVk⊤X_{\text{recon}} = Z V_k^\top = X V_k V_k^\top
(1)

We are working on PCA Reconstruction, also called PCA decoding, with canonical formula Xrecon=ZVk⊤=XVkVk⊤X_{\text{recon}} = Z V_k^\top = X V_k V_k^\top, where XX is the centered data matrix, VkV_k contains the first kk principal directions as orthonormal columns, and Z=XVkZ = X V_k 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 XX in a rank-kk 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 X∈Rn×pX \in \mathbb{R}^{n \times p} into scores Z∈Rn×kZ \in \mathbb{R}^{n \times k} using the first kk principal components. In the decoding step, we expand those scores back into a pp-dimensional approximation:

Xrecon=ZVk⊤X_{\text{recon}} = Z V_k^\top
(2)

Because Z=XVkZ = X V_k, reconstruction can also be written as:

Xrecon=XVkVk⊤X_{\text{recon}} = X V_k V_k^\top
(3)

This is not usually equal to the original centered matrix XX, unless k=pk = p or the data already lies exactly in the kk-dimensional principal subspace. Instead, it is the orthogonal projection of each observation onto the subspace spanned by the first kk principal directions.

Why this matters in DA/DS:

  • Compression: store n×kn \times k scores instead of n×pn \times p original centered values when k≪pk \ll p.
  • 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 XX and XreconX_{\text{recon}} gives the residual matrix, which quantifies information loss.

Input:

  • Centered data matrix XX
  • PCA loading matrix VkV_k Intermediate object:
  • Score matrix Z=XVkZ = X V_k Output:
  • Reconstructed approximation XreconX_{\text{recon}} 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.

Flowchart

Start withcentered datamatrix XSelect first kprincipaldirections V_kEncode datainto scores Z =X V_kDecode scoresback to originalfeature space:X_recon = ZV_k^TEquivalent form:X_recon = XV_k V_k^TCompare X andX_reconInterpretretainedstructure,compressionquality, anddenoising effectComputeresidual error: X- X_recon

#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