Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SVM predict multiclass

Im curious about how to go about using the predict method in SVM for a multi class object detector using BoF and SIFT.

Ive trained the svm with 8 classes, and when I call predict it determines the class label. Thats all well and good but I am trying to determine the probability. I am reading video frames and each frame is so closely related that the label alone will not help.

I need to figure out how to calculate the probability so that I can choose the closest match possible after reading all of the frames.

I am looking into getDecisionFunction but the result is always the same (0.986196) for each frame in the video that I am using the SVM to predict.

Is there a step that I need to take in order to fetch the probability of the prediction?

I am using openCV 3.1 if this helps.

Thanks, John