Linear discriminant analysis
LDA has two connected uses: classifying with shared-covariance Gaussian models and extracting directions that separate labelled classes. Fisher's criterion compares between-class separation with within-class spread.
5.1 Gaussian LDA and nearest means
Past papers · DA 2024–2026 (3 papers): 1 question, 2 marks
Let class have mean , prior and a common positive-definite covariance matrix . The feature vector is . The following scores assume multivariate Gaussian class-conditionals.
Estimate class means from their observations. The pooled covariance maximum-likelihood estimate is , where is defined in Section 5.2; the pooled unbiased estimate uses . Use the divisor stated in the question. It can shift a boundary when priors are unequal. If the shared covariance is singular, the displayed inverse is unavailable without a specified modification.
With equal priors, choose the nearest mean in Mahalanobis distance. If also , choose the nearest Euclidean mean. Unequal class covariances generally give quadratic boundaries; Gaussian naive Bayes only requires each covariance to be diagonal, not equal across classes.
5.2 Fisher projection and scatter
Past papers · DA 2024–2026 (3 papers): 1 question, 1 mark
Let be the overall mean, the class counts, and the class means. Scatter matrices are sums, not averaged covariance matrices.
The total scatter satisfies , where . There are at most nonzero discriminant directions. For two classes, . Omitting the positive count factor preserves the direction but changes .
Last-minute recall
- Shared covariance makes Gaussian discriminant boundaries affine.
- Equal priors remove the prior shift, but not covariance scaling.
- Euclidean nearest means need spherical shared covariance and equal priors.
- Fisher uses labels; PCA does not.
- Scatter normalisation changes eigenvalues even when directions remain unchanged.
- Binary Fisher LDA has at most one useful discriminant direction.