Ask Your Question

Revision history [back]

Actually your problem is quite simple. You are using a binary classifier (SVM implementation for CvSVM is binary / 2 classed) to try and solve a 4 class SVM problem.

Solution to this can be to train a 1 vs all classifier for each class. Or you could make a classifier for each combination of 2 classes and evaluate those. Thats a design choice.

For this all positive and negative data need the same amount of features in their descriptor as well as a +1 or -1 label with it. That will then result in a classifier ouputting labels near +1 or -1, assigning the certainty for a class together with the result.