Naive Bayes
Our last baseline model will be a Naive Bayes classifier. Before we discuss this model, we need to review a few concepts of probability. The first is conditional probability. When dealing with two events, A and B, the probability of event A happening, given that event B happened, is the conditional probability and is written as P(A|B). When events A and B are independent, meaning B happening doesn't tell us anything about A happening and vice versa, P(A|B) is P(A).
The conditional probability is defined as the joint probability of both A and B occurring (which is the intersection of these events), written as P(A ∩ B), divided by the probability of B occurring (provided this is not zero):
This equation can be rearranged as follows: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access