SVM Confidence with 3 Classes

asked 2015-07-12 21:24:38 -0500

jackbrucesimspon gravatar image

I really need to access the confidence of the prediction my SVM has made, and the method gives me the option of "returnDFVal":

returnDFVal – Specifies a type of the return value. If true and the problem is 2-class classification then the method returns the decision function value that is signed distance to the margin, else the function returns a class label (classification) or estimated function value (regression).

Unfortunately, I have 3 classes, so this doesn't work for me. Is there any way I can get around this or another method I can call to determine the confidence of my prediction?

edit retag flag offensive close merge delete


Have you seen this?

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-13 02:14:07 -0500 )edit

I don't think that other question answers this one

LorenaGdL gravatar imageLorenaGdL ( 2015-07-13 06:53:58 -0500 )edit

I see that it is saying that there is a way to compute a probability from the decision function result, but with some calibration (like libsvm does); but, as the docs says, there is no way to determine the decision function value for more than 2 classes, so no probability/confidence for the prediction...

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-13 07:30:00 -0500 )edit

Thanks for the advice guys, do you think a possible solution could be to add an additional class to my SVM containing "ambiguous" data?

jackbrucesimspon gravatar imagejackbrucesimspon ( 2015-07-13 21:17:34 -0500 )edit

You can try it, but be careful, the ambiguous class should not contain samples that are too similar to the ones in the other classes because it may make the classifier worse.

thdrksdfthmn gravatar imagethdrksdfthmn ( 2015-07-15 02:11:50 -0500 )edit