where p(d|c j ) is the probability of generating instance d given class c j , p(c j) is
the probability of occurrence of class c j, and p(d) is the probability of instance d
occurring. Of these, p(d) can be ignored since it is the same for all classes. p(c j) is
simply the fraction of training instances that belong to class c j .