aNet.ai
Machine Learning/Learning path
0day streak0XP · Lv 1
← 14. Dimensionality Reduction
Lesson 4 of 10 10 min · 140 words

Principal Component Analysis

Projecting onto the directions of greatest variance.

Principal component analysis (PCA) finds a new set of orthogonal axes, ordered by how much of the data's variance lies along them. Keeping only the first axes gives the best -dimensional linear summary of the data.

The recipe:

  • Centre the data (subtract the mean of each feature), and usually standardise it.\n- Compute the covariance matrix .\n- Find its eigenvectors (principal directions) and eigenvalues (variance along each).\n- Sort by eigenvalue and keep the top eigenvectors as columns of .\n- Project: , an matrix of new features.

The components are uncorrelated with each other. PCA is unsupervised (it ignores labels), linear, and sensitive to scaling — a feature measured in large units would dominate unless standardised.

Formula to remember

Reconstruction error

Equivalent view: best low-rank reconstruction.

Quick check · +5 XP

Eigenvalues 4.62 and 0.38: the first component explains about…

Practice this topic
Saved in this browser as you type.
aNet.ai · Introduction to Machine Learning · NewUU course outlineProgress saved in this browser