I am currently looking into the multinomial model for Naive Bayes classification, and have come across the following example:
I think I understand everything, but I have developed the following reasoning I would like confirmed:
For a given class c, and document d consisting of terms t1, t2, ..., tn. Here is how to calculate P(c|d):
P(class | doc): (prior[c]) * (prob[t1 in c]) * (prob[t2 in c]) * ... * (prob[tn in c])
P (! class | doc): (prior[!c]) * (prob[t1 in !c]) * (prob[t2 in !c]) * ... * (prob[tn in !c])
Is this correct? And thus, is this the reason the power 3 is present in both (3/7) and (2/9), denoting P(Chinese|c) and P(Chinese|!c) together with the fact that 'Chinese' appears three times in d5?
Thank you in advance.