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

Explained variance and visualization

Choosing the number of components and plotting data in 2D.

The explained variance ratio of component is . The cumulative sum over the first components says how much of the total variance they keep.

Choosing :

  • Keep enough components for, say, 90–95% cumulative variance.
  • Look for an elbow in the scree plot (eigenvalue vs. component number).
  • Choose by cross-validating the downstream model.
  • For visualisation, simply use or .

Plotting the first two components often reveals clusters, outliers and trends; colouring the points by label shows whether classes separate.

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