Clustering & Dimensionality Reduction ยท Unsupervised learning

Principal Component Analysis

Compressing many correlated variables into a few components that keep most of the information.

Scatter of correlated points with arrows showing the two principal component directions
Diagram: Nicoguaro, CC BY 4.0, via Wikimedia Commons

Category

Clustering & Dimensionality Reduction

Learning type

Unsupervised

Complexity

Medium

Interpretability

Low

Overview

What principal component analysis does

Principal Component Analysis (PCA) rotates a dataset onto new axes, called principal components, ordered by how much of the variation in the data each one captures. Keeping only the first few components shrinks dozens or hundreds of correlated columns into a handful that still describe the data well, which makes it easier to visualize, faster to model, and less noisy.

Formula

Z = XW, where W holds the top-k eigenvectors of cov(X)

Quick profile

ComplexityMediumInterpretabilityLow

Data it needs: Hundreds of rows with many numeric columns

Process

How it works, step by step

  1. 1

    Standardizes each feature so variables measured on large scales do not dominate

  2. 2

    Computes the covariance matrix to see how features move together

  3. 3

    Finds the eigenvectors (directions) and eigenvalues (variance captured) of that matrix

  4. 4

    Sorts components by variance explained and keeps the top k

  5. 5

    Projects every record onto those k components to produce the reduced dataset

Worked example

Condensing a customer survey

A 40-question satisfaction survey has heavily overlapping answers. PCA reduces it to four components (roughly price, service, product, and convenience) that feed a churn model and fit on a single dashboard chart.

When to use it

  • When you have many correlated numeric features
  • Before clustering or regression to remove noise and redundancy
  • When you need to plot high-dimensional data in two or three dimensions
  • When training time or storage is a constraint
  • When multicollinearity is distorting a linear model

Strengths

  • Reduces dimensionality without needing labels
  • Removes correlation between features
  • Speeds up downstream models
  • Makes high-dimensional data visual
  • Deterministic and well understood

Limitations

  • Components are combinations of features, so they are hard to explain
  • Only captures linear structure
  • Sensitive to feature scaling
  • Can discard low-variance signal that still matters for prediction
  • Outliers can pull components off course

Applications

Where it is used

01Compressing survey or sensor data before modeling
02Visualizing customer segments
03Image compression and face recognition (eigenfaces)
04Reducing noise in financial factor models
05Feature reduction for genomics and lab data

Need a model built on your data?

Tell us the decision you want to improve. We will tell you whether your data can support it and which approach fits.