Linear Classification and Advanced Methods · Machine Learning

Linear Discriminant Analysis

Watch lectures

Linear Discriminant Analysis

1. Idea

Generative classifier: model each class as Gaussian with shared covariance ΣΣ, then Bayes rule gives a linear boundary. Best when classes are roughly Gaussian blobs with same shape.

2. Model

p(x∣y=c)=Gauss with mean μc and shared Σp(x|y=c) = \text{Gauss with mean } μ_{c} \text{ and shared } Σ

Discriminant (log posterior up to constant):

δc(x)=xTΣ−1μc−12μcTΣ−1μc+logπcδ_{c}(x) = x^{T} Σ^{-1} μ_{c} - \frac{1}{2} μ_{c}^{T} Σ^{-1} μ_{c} + log π_{c}

Pick class with largest δcδ_{c}. Difference δ1−δ2δ₁ - δ₂ is linear in xx.

3. Training

μcμ_{c} = class mean, ΣΣ = pooled within-class covariance, πcπ_{c} = class frequency. No iteration — closed form.

4. LDA vs Logistic

LDA Logistic
Type generative (models xx) discriminative (models p(y∣x)p(y|x))
Needs Gaussian + shared ΣΣ fewer assumptions
Small nn stabler (strong bias) may overfit

5. Exam Points

  • State shared-covariance → linear boundary — 5 marks, very frequent.
  • Write discriminant form — 5 marks, frequent.
  • LDA vs logistic — 3 marks, frequent.
Student FinanceWeb Platform

Pocketly — Personal Finance for Students

Keep your hostel and college expenses under control. Track accounts, log spending in seconds, and stay within your monthly budget.

← All Machine Learning modules