Built the Naive Bayes classifier model.