Same setup as the Gaussian version but with binary features: likelihoods[c][j]
is . Return the unnormalised log score for
each class, not a probability.
Classifiers usually stop here: to pick a class you only need the argmax, and normalising costs an exponential you do not need.
Input
priors = [0.5, 0.5]
likelihoods = [[0.9, 0.1], [0.2, 0.8]]
features = [1, 0]
Output
[-0.9038682118755978, -3.912023005428146]