AlgoPlus//machine learning / pca
Read the theory

Principal Component Analysis

Find the axes of greatest variance, then project to fewer dimensions.

PC1 variance
Phase
Your points (x,y; separated)
Legend
Data point
PC1
PC2
AI Tutor Workspace
In a nutshell
PCA compresses data by finding the directions it varies along most. It centers the data, then computes the principal components — new axes (the eigenvectors of the covariance matrix) ranked by how much variance each one captures. Keeping just the top few and projecting the data onto them discards the least informative directions, cutting the number of dimensions while preserving most of the information.
Ready
Press play to begin the cinematic walkthrough.
Tilt your head until the data looks longest — that direction holds the most information. Keep a few such directions and you've compressed the data with barely any loss.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Principal Component Analysis.