Gaussian Naive Bayes
Imagine you’re trying to decide whether an email is spam by looking at several clues—word counts, number of links, or message length. Gaussian Naive Bayes is a simple way to turn those clues into a probability for each class and pick the most likely one.
What it is and the “Gaussian” part
Naive Bayes classifiers use Bayes’ theorem to compute P(class | features). The “naive” assumption is that features are conditionally independent given the class. In Gaussian Naive Bayes, each numeric feature is modeled, within each class, as a Gaussian (normal) distribution. Concretely, for every class and every feature, the model estimates a mean and variance from the training data, then uses the normal density to score how likely a new value is under that class.
How prediction works (mechanism)
For a new example, it multiplies (or, in practice, adds log) the per-feature likelihoods and combines them with the class prior:
- Compute a prior for each class (how common it is).
- For each feature, compute its Gaussian likelihood under that class.
- Combine them to get a posterior score per class and choose the largest.
In scikit-learn, this is implemented as
from sklearn.naive_bayes import GaussianNB.
Why it matters in practice
Gaussian Naive Bayes is fast, works well with small datasets, and handles high-dimensional numeric data surprisingly well. It’s common in quick baselines for:
- Spam or fraud detection using numeric aggregates (counts, rates, lengths)
- Disease diagnosis from lab measurements
- Customer churn prediction from usage statistics
If the features are strongly correlated (violating independence) or far from bell-shaped within each class, accuracy can drop—but as a lightweight probabilistic classifier, it’s hard to beat for speed and simplicity.
Gaussian Naive Bayes is a Naive Bayes classifier that models each continuous feature’s class-conditional likelihood as a Gaussian (normal) distribution, estimating a mean and variance per feature per class under conditional independence. It produces class probabilities via Bayes’ rule and predicts the most probable label. It matters because it provides a fast, data-efficient baseline for continuous-valued classification and enables calibrated probabilistic outputs for decision-making.
Imagine sorting fruit by looking at a few clues: weight, color, and size. You might think, “Apples usually weigh around this much, bananas around that much,” and pick the most likely label. Gaussian Naive Bayes is an AI method that does something similar for data.
It’s used for classification tasks like spam vs. not spam, or “healthy” vs. “needs attention” in a medical check. “Gaussian” means it assumes each clue is spread out in a smooth bell shape (like heights in a population). “Naive” means it treats each clue as if it doesn’t affect the others, which is often imperfect but surprisingly useful.