Quadratic Discriminant Analysis
Like LDA but allows each class its own covariance matrix โ giving quadratic rather than linear decision boundaries.
Unlike LDA, QDA lets each class have its own covariance matrix, so the quadratic terms do not cancel.
Quadratic Discriminant Analysis (QDA) is a generative classifier similar to LDA, but each class has its own covariance matrix instead of a shared one.
Model: class follows with prior .
Because the quadratic terms in no longer cancel (different per class), the decision boundary between classes is quadratic (a conic section in 2D โ ellipse, parabola, or hyperbola).
This gives QDA more flexibility than LDA โ it can model non-spherical, differently-shaped class regions.
- Decision boundaries are always conic sections โ ellipses, parabolas, or hyperbolas in 2D
- Reduces exactly to LDA when all class covariances happen to be equal
- More flexible than LDA, at the cost of estimating far more parameters
- A generative model: it models the full class-conditional distribution, not just the boundary
- Using QDA with too little data per class: each class needs enough samples to reliably estimate its own covariance matrix, or the estimates become unstable/singular
- Assuming QDA is always better than LDA because it's more flexible: extra flexibility costs variance โ with limited data, LDA's shared-covariance bias can outperform QDA's lower-bias-but-higher-variance estimate
Two classes: Class 0 is a round blob, Class 1 is a thin diagonal streak. LDA (shared covariance) fits an average oval and draws a line โ poor fit. QDA models each class separately โ Class 0 gets a circular Gaussian, Class 1 gets an elongated one. The curved boundary separates them much better.
When might you prefer LDA over QDA even if class covariances differ? Think about sample size.
Solution
QDA estimates covariance matrices, each of size : total parameters for covariances alone. LDA estimates just one: .
With small training sets, QDA's many parameters will overfit. LDA shares data across classes to estimate a single, more reliable covariance. The bias from the equal-covariance assumption may be worth the reduction in variance.
Rule of thumb: use LDA when is small (few examples per dimension per class); QDA when you have ample data and class shapes clearly differ.