Conditional probability is a concept in probability theory. It refers to the probability of event B occurring given condition A, denoted by P(B|A), and is calculated as follows.
P(B∣A)=P(A)P(AB)
1.2 Bayes’ Theorem
Compared with conditional probability, Bayes’ theorem applies the inverse process. Given that event B has occurred, it calculates the probability of condition A under which the event occurred, namely P(A|B). It is calculated as follows, where the denominator is the law of total probability.
Likewise, extending this to a classification problem, suppose there are K classes c1,c2…ck. Given a new instance x=(x(1),x(2)…x(n)), we want to determine the likelihood that this instance belongs to class ci.
Compared with the general Bayes approach, naive Bayes adds the assumption that the features of an instance are mutually independent, making the calculation easier.
Comments