Naive Bayes
- Naive bayes is formed from Bayes Theorem
- Naive bayes is called naive as it assumes all the features are independent of each other, which is really no the case in real life
For example,
Given msg = "Dear Friends", predict if it is Spam or Not-Spam
$$
\begin{align*}
P(Spam|Dear Friend) &= P(Dear Friend|Spam) P(Spam) \\&= P(Dear|Spam) P(Friend|Spam) P(Spam)
\end{align*}
$$
[!def] Naive Bayes
$$
P(X|x_1, x_2, ... x_n) = \prod_i p(x_i|X) P(X)
$$
Advantages:
- Works well with small dataset
- Lesser overfitting
- Smaller in size
- Faster Processing