Refactor ParsimmonNaiveBayesClassifier.