While I am using SVM, I train it with a train data and then I try to predict a sample if its label is -1 or +1. However, I see some confusion matrice for SVM like below. Mine are 2x2 matrice but their dimesions are larger, e.g. 15x15. Do they have more than one SVM? How people do such things? It is easy to write one diagonal but how they decide other values? In the figure below, for 2, it is easy to write 38 but how they write 2?

BTW, I am new to these topics.

15x15 confusion matrix

  • $\begingroup$ I understand if there are 15 svm models. While we are evaluating a sample if its model is correctly classifies it then we increment the value, e.g. 38 for 2. And if it is correctly classified by another model (this is a false positive), e.g. 10's model, we increment the value, e.g. 2 for 2. However, what if there are more than one model which says it is a valid (+1) sample for that model? What would we do in this case? How can we sure which one is correct? $\endgroup$ – Ricardo Cristian Ramirez Mar 23 '13 at 21:50
  • 1
    $\begingroup$ There are multi-class SVMs as well ( svmlight.joachims.org/svm_multiclass.html ). For that matter, from the name of the file, it seems they are using one vs all multiclass SVMs - stats.stackexchange.com/questions/21465/… $\endgroup$ – TenaliRaman Mar 24 '13 at 2:19
  • $\begingroup$ Confusion tables belong to classification (used in the sense that the outcome is nominal or maybe ordinal), not to regression - I removed the "regression" tag. $\endgroup$ – cbeleites unhappy with SX Mar 24 '13 at 17:09

Based on only the context we can get from the URL name, they are most likely using 15 SVMs, each of which tries to classify one class "versus" the rest (one-vs-all). Thus you need 15, and thus 15x15 confusion matrix.

You make a good point - more than one of these might declare a new point as their own. What then? A simple way is to use the hyperplane that is output as the model for the SVM and compare the distance to the plane in all +1 class labelings and accept the class for which the distance from the point to the plane is the greatest (ie, was most confidently classified).

The off-trace (incorrect) labelings the classifier makes are still done in the same way, ie,

C_ij = count(we declared i, but was actually j)

| cite | improve this answer | |

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.