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: ...