Histogram Based Naive Bayes Implementation in java