Implemented Bernoulli Naive Bayes classification