# Naive Bayes

Learn the theory behind the naive Bayes algorithm and how to apply it using Python.

Naive Bayes is a popular classification algorithm that assumes independence between features. It’s particularly useful for text classification and spam filtering, but it may not always hold true in practice due to its simplistic assumption. Before diving into naive Bayes, let’s understand the Bayes’ theorem, upon which naive Bayes is based.

## Bayes’ Theorem

**Bayes’ theorem** is a fundamental concept in probability theory and statistics that describes how to update the probability for a hypothesis (or event) based on new evidence or data. It’s named after the Reverend Thomas Bayes, an 18th-century statistician and theologian.

Bayes’ Theorem mathematically expresses this relationship as follows:

Get hands-on with 1200+ tech skills courses.