Unfolding Naive Bayes from Scratch: Part 2

When doing the calculations of probability of the given test sentence in the above section, we did nothing but implement the given probabilistic formula for our prediction at test time: Decoding the above mathematical equation: “|” = a state which has already been given/or some filtering criteria “c” = class/category “x” = test example/test sentence p(c|x) is given the test example x, what is the probability of it belonging to class c?.This is also known as posterior probability..This conditional probability is found for the given test example x for each of the training classes..p(x|c) is given the class c, what is the probability of example x belonging to class c?.This is also known as the likelihood as it implies how likely example x belongs to class c..This is finding the conditional probability of x out of total instances of class c only – i.e..we have restricted/conditioned our search space to class c while finding the probability of x..We calculate this probability using the counts of words that are determined during the training phase..We implicitly used this formula twice above in the calculations sections as we had two classes..Do you remember finding the numerical value of product (p of a test word “j” in class c)?.p implies the probability of class c..This is also known as the prior probability or unconditional probability.. More details

Leave a Reply