Implemented multiclass naive bayes classification