Machine Learning & AI
Advanced

PCA (Covariance)

Finds directions of maximum variance via eigenvectors of the covariance matrix.

Formula

C=1nXX,    Cv=λv\mathbf{C} = \tfrac{1}{n}\mathbf{X}^\top\mathbf{X},\;\; \mathbf{C}\mathbf{v}=\lambda\mathbf{v}

Variables

\mathbf{C}Covariance matrix
\mathbf{v}Eigenvector
\lambdaEigenvalue

Example

Top eigenvectors are the principal components

Did You Know?

PCA compresses data by keeping only the directions that carry the most variance.

Share this formula