AlgoPlus//machine learning / naive-bayes
Read the theory

Naive Bayes

Multiply per-word likelihoods by the prior and pick the bigger class — spam or ham.

P(spam)
P(ham)
Words in your email (toggle present / absent)
Legend
Spam
Ham
AI Tutor Workspace
In a nutshell
Naive Bayes is a fast classifier — the classic spam filter — built on Bayes' rule. It starts from how common each class is, then multiplies in how telltale each clue (each word) is for that class, and picks the class with the higher result. It naively assumes the clues are independent, which is rarely true but works surprisingly well.
Ready
Press play to begin the cinematic walkthrough.
Pretend every clue is independent and just multiply the odds. It's a lie — words aren't independent — but the lie cancels out enough that the winner is usually right.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Naive Bayes.