Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SVM, at least in the OpenCV implementation, does not output any measure that can be used as extra threshold. However, internall, it calculates a distance to the separation plane, by which it determines the class where the input vector belongs to. That distance may be interesting for you.

If you are not ready to fork OpenCV in order to output it, you may want to control it the other way: set it as input for the train() method. So it will automatically discard those vectors that are too close to the separation plane (i.e. The probability is low).

The parameter in question is CvSVM::EPS_SVR and you can set it through the CvSVMParams class

SVM, at least in the OpenCV implementation, does not output any measure that can be used as extra threshold.

However, internall, it calculates a distance to the separation plane, by which it determines the class where the input vector belongs to. That distance may be interesting for you.

If you are not ready to fork OpenCV in order to output it, you may want to control it the other way: set it as input for the train() method. So it will automatically discard those vectors that are too close to the separation plane (i.e. The probability is low).

The parameter in question is CvSVM::EPS_SVR and you can set it through the CvSVMParams class