Reputation:
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?
Upvotes: 2
Views: 1983
Reputation: 135
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).
Upvotes: 0
Reputation: 1
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.
Upvotes: -1
Reputation: 12152
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.
Upvotes: 3