# How to do pair wise classification?

I would like to know how to do a pairwise classification.

I have 3 classes A,B and C. I have samples for each class. Now I would like to build a classifier in such a way that given a new test sample, my model should say the probability of it belong to class A or B, B or C and C or A.

Is there a way to do it?

Or is there a way to say my test image definitely doesn't belong to a particular class and thus i can say it belongs to any of the other two classes.

• I would suggest you to lookup the classifier concept of $k$-NN, which by its nature can handle multi class classification problems. It is very simple to implement, so that you don't need to use blackbox components. Furthermore, you can "see" what led your classifier to its decision. Another advantage of this classifier is that you don't have many "magic" parameters (in contrast to SVM) as there are only the $k$ and the used distance function... – Unhandled exception Aug 19 '15 at 11:18