7
$\begingroup$

I know how Naive Bayes work for classifying binary problems. I just need to know what are the standard way to apply NB on multi-class classification problems. Any idea please?

$\endgroup$
16
$\begingroup$

Unlike some classifiers, multi-class labeling is trivial with Naive Bayes.

For each test example $i$, and each class $k$ you want to find: $$\arg \max_k P(\textrm{class}_k | \textrm{data}_i)$$

In other words, you compute the probability of each class label in the usual way, then pick the class with the largest probability.

$\endgroup$
  • $\begingroup$ Thank you Matt. As you said, it is pretty straightforward. While I think this would not be the case with SVM for example. $\endgroup$ – Mohammadreza Mar 25 '15 at 3:30
  • $\begingroup$ My pleasure. For other methods, there are (many) ways of combining two-way classifiers (like SVMs) into a multi-class system. I think there has also been some work on extending SVMs to do this "natively." $\endgroup$ – Matt Krause Mar 25 '15 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.