AI & ML Atlas
Machine LearningalgorithmInteractive simulation
Quadratic Discriminant Analysis (QDA)
Like LDA, but each class gets its own covariance, giving curved boundaries.
The idea
Allowing each class its own spread makes the discriminant function quadratic, so the boundary can be an ellipse, a parabola or two lines. It is more flexible than LDA but needs more data to estimate the extra parameters reliably.
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- class 0
- class 1
All the data starts in one box. The tree will ask yes/no questions to separate the classes.
- impurity:
- 0.5
1/4
Every cut is axis-aligned, so each region is a rectangle. Deeper trees carve finer boxes and can overfit.
Step by step
- 1Compute each class's mean and its own covariance matrix.
- 2Evaluate the quadratic discriminant for each class.
- 3Pick the class with the highest score.
- 4The boundary is where two scores tie, a curve.
Where it is used
Classes with clearly different shapes and enough data.
Watch out for
Many parameters: unreliable with few samples or many features.