# Naive Bayes

> A fast model that sorts things by adding up the odds from each clue.

**Field:** Artificial Intelligence  
**Category:** Machine Learning  
**Also known as:** Naive Bayes Classifier, Naïve Bayes

## Think of it like

It is like guessing rain from clouds, wind and smell. You count each clue on its own.

## Definition

Naive Bayes is a simple model that sorts things using odds. It learns how often each clue shows up in each class. For email, it counts how often words like "prize" show up in spam and in real mail. To sort a new email, it combines the odds from every word. It is called naive because it treats each clue as if it had nothing to do with the others. It is fast and needs little data.

## Example

An early spam filter sees "free", "prize" and "click" in one email. Each word tips the odds toward spam, so the email goes to the spam folder.

## Why it matters

It trains in seconds and works well on text. It is a good first model to beat.

## Common mistake

Trusting its odds as exact. The class it picks is often right, but the percent it gives is often too sure.

## Three principles

- **Counts clues.** How often each clue shows per class.
- **Treats clues apart.** That is the naive part.
- **Fast and light.** Little data, quick to train.

## Related terms

- [Classification (Machine Learning)](https://learn.benibix.com/term/ai/classification)
- [Logistic Regression](https://learn.benibix.com/term/ai/logistic-regression)
- [Baseline Model](https://learn.benibix.com/term/ai/baseline-model)
- [Probability](https://learn.benibix.com/term/general/probability)
- [Spam Filter](https://learn.benibix.com/term/ai/spam-filter)

## Taught in

- [k-NN, SVM and Naive Bayes](https://learn.benibix.com/learn/ai-machine-learning/knn-svm-and-naive-bayes): Machine Learning, 9/18

![Three words from one email, free, prize and meeting, each with a bar from a centre line. Free and prize push right, toward spam. Meeting pushes a little left, toward real mail. Below, all the pushes added together reach far toward spam.](https://learn.benibix.com/diagrams/ai3-naive-bayes.svg)

---

Source: https://learn.benibix.com/term/ai/naive-bayes
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
