It is important to understand Bayes' theorem before diving into the classifier. Let A and B denote two events. An event can be that it will rain tomorrow, two kings are drawn from a deck of cards, a person has cancer. In Bayes' theorem, the probability that A occurs given B is true can be computed by:
Where is the probability of observing B given A occurs, and , the probability of A occurs and B occurs respectively. Too abstract? Let's look at some examples:
Example 1: Given two coins, one is unfair with 90% of flips getting a head and 10% getting a tail, another one is fair. Randomly pick one coin and flip it. What is the probability that this coin is the unfair one, if we get a head?
We solve it by first denoting U, the event of picking the unfair coin and H, the event of getting a head. So the probability that the unfair coin is picked given a head is observed...