Fixed naive bayes to use min loglihood rather than max