Search code examples
algorithmmachine-learningmahout

Differences between StandardNaiveBayesClassifier and ComplementaryNaiveBayesClassifier in mahout


Maybe my question is quite sophisticated, but I would like to know the main differences between StandardNaiveBayesClassifier and ComplementaryNaiveBayesClassifier algorithms in Mahout. Which one performs better on smaller amount of training data or it is data dependent issue? Which one is better for sentiment analysis? And some other aspecs...

Thank you in advance!


Solution

  • Complement naive Bayes is an naive Bayes variant that tends to work better than the vanilla version when the classes in the training set are imbalanced. In short, it estimates feature probabilities for each class y based on the complement of y, i.e. on all other classes' samples, instead of on the training samples of class y itself.