Question

I am using openCV but I can't find anything in the documentation about what the parameter returnDFVal means in the predict method for support vector machines. Does anybody else know?

Was it helpful?

Solution

I haven't looked at the documentation, and I haven't used SVMs from OpenCV (but I have used LIBSVM). My guess is that it means: return decision function value. If you set it to true, you get the distance to the margin (and you get the class by looking at the sign of that value) and if it is false it returns +1 or -1 depending on the class.

OTHER TIPS

According to http://docs.opencv.org/modules/ml/doc/support_vector_machines.html

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).

It actually returns the classifier of the input data that closest matches the trained data. This is the classifier that you would have provided during training.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top