Main class for naive bayes classifier