Videos

$$ \begin{align*} P(Hypothesis|Evidence) &=\frac{P(Evidence|Hypothesis)P(Hypothesis)}{P(Evidence)} \\ \\ &= \frac{P(E|H)P(H)}{P(E|H)P(H)+P(E|notH)P(not H)} \\ \end{align*}

$$

Naive Bayes

Video: Naive Bayes, Clearly Explained!!!

For spam filter example:

  1. Find the P(Spam | Text) and P(Normal | Text). Label message as spam based on relative values of these probabilities
  2. If Text = “Hello World”, then
  3. If a word never comes in spam or normal, then P(Word | Spam) would be zero. That would make the P(Spam | Text) = 0

Why is Naive Bayes naive?

Because it doesn’t take into account the order of words by assuming that each word is independent of each other. That allows us to write:

P(Hello, World | Spam) = P(Hello | Spam) P(World | Spam)