Home/AI/ML Notes/Deep Learning and Machine Learning/Classic ML: Naïve Bayes
⌂ Main Page
Deep Learning and Machine Learning

Classic ML: Naïve Bayes

The Naïve Bayes family, assumptions, and use cases.

Classic ML Algorithms

Naïve Bayes

Naive Bayes is a fast & simple classifier that works well even with thousands of features. It has few tunable hyperparameters, so it’s a popular baseline.

1. Bayes’ theorem (applied to language model)

Posterior probability based on prior knowledge:

A black and white math equation AI-generated content may be incorrect.

Here, L = language model and x=(x1, …, xd) are features. P(features x | L) = generative model specifying the hypothetical random process that generated the data.

2. The “naive” assumption
Calculating this model is hard; to find a rough approximation of the generative model for each class, we assume a naive assumption – features are conditionally independent given the class:

3. Variants (different naive assumptions about the data

Red curve is Gaussian

When to Use Naive Bayes Classifiers