Gaussian Naive Bayes
Naive Bayes for continuous features, modelled as bell curves per class.
The idea
For each class and each feature, it estimates a mean and variance and uses the normal density as the likelihood. Classification multiplies those densities with the class prior. Boundaries are smooth curves where the class densities cross.
P(x | c) = (1/√(2πσ²))·exp(−(x−μ)²/2σ²)
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
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 prior.
- 2For each class and feature compute the mean and variance.
- 3Evaluate the Gaussian density of the new point's features.
- 4Multiply by the prior and choose the largest.
Where it is used
Measurements such as sensor or medical readings.
Watch out for
Features that are not bell-shaped give poor likelihoods; transform them first.