ClassificationSample
Naive Bayes (Gaussian)
Applies Bayes’ theorem, assuming each feature is normally distributed and independent within a class.
Synthetic data, generated and trained in your browser.
Try this
- 01On Two blobs the Gaussians fit well and the boundary is smooth.
- 02On Circles, one class sits inside the other: the curved boundary comes from unequal variances.
- 03Raise smoothing to the maximum and watch the ellipses swell and the probabilities flatten.
How it works
- 1For each class, estimate its prior and a mean and variance per feature.
- 2For a new point, multiply the per-feature likelihoods (the naive independence assumption).
- 3Combine with the prior and normalise to get class probabilities.
What the controls teach
- Variance smoothing
- Added to every variance. Larger values widen the Gaussians and soften the boundary.
Use it when
- Very fast baselines
- Text and other high-dimensional data
Avoid it when
- Strongly correlated features
- When well-calibrated probabilities are needed