The idea
Imagine stamping the same oval cookie cutter onto the plane once per class, centred on that class's average point. To classify a new point, ask which stamp it sits most comfortably inside, allowing for how common each class is.
Because every class uses the identical oval, the curved parts cancel when you compare two classes. What is left is a straight-line boundary, even though the model is built from Gaussians.
How it learns
- Compute the mean of each class.
- Measure how points spread around their own class mean, and pool that spread into one shared covariance.
- Optionally shrink the shared covariance towards a circle.
- Set each class prior to its share of the points.
- Classify with Bayes' rule: pick the class with the highest prior likelihood.
Reading the picture
With Show class Gaussians on, each class gets ellipses around its mean. They all have the same shape and orientation, only the centres differ. The background shows the most probable class, shaded by confidence.
The boundaries are always straight lines. They are not simply halfway between the means: the shared tilt of the ellipses rotates them, and class priors shift them towards the rarer class.
Try this
- On Blobs, drag the points of one class into a long streak. Every class's ellipse changes shape together, because they all share one covariance.
- Load Circles. LDA can only draw straight lines, so it fails. Compare with QDA on the same data.
- Erase most points from one class until only three or four remain, then raise Shrinkage. The ellipses become rounder and the boundary steadier.
- Add many extra points to class A on Blobs. The boundary slides towards B as A's prior grows.
The maths
Class model
Shared covariance
Shrinkage
Discriminant
Posterior
Strengths and weaknesses
Good at
- Few parameters, so it works with little data.
- Fast, closed-form fit with no tuning loop.
- Gives probabilities and interpretable class shapes.
Struggles with
- Boundaries are always straight.
- Assumes every class has the same spread.
- Sensitive to outliers that distort the means.