machine-learning linear-algebra statistics dimensionality-reduction
Definition
Principal Component Analysis
Principal Component Analysis (PCA) is a deterministic linear dimensionality reduction technique that identifies a lower-dimensional subspace that captures the maximum variance of the data. Formally, for a centred data matrix
with covariance matrix , PCA seeks a direction with that maximises the projected variance:
The solution is the eigenvector corresponding to the largest eigenvalue of the covariance matrix
.
Optimisation: The Lagrangian Approach
The objective is to maximise
Taking the derivative with respect to
Substituting this back into the variance term gives
Structural Properties
Orthogonality: The principal components (the projected directions) are mutually orthogonal and form a new basis for the feature space.
Reconstruction Error: Maximising the variance is mathematically equivalent to minimising the mean squared reconstruction error between the original data and its projection.
Linearity: As a linear method, PCA identifies subspaces (planes or hyperplanes). It may fail to capture non-linear structures, for which t-SNE or spectral clustering are more appropriate.
Numerical Stability: The quality of the principal components depends on the distribution of the eigenvalues. If the eigenvalues are roughly equal (