Ask Your Question

Revision history [back]

The answer depends on a particular classifier that you want to use.

For example, if you use a classifier based on decision trees you can use priors parameter to adjust weights of classes (see CvDTreeParams).

In case of SVM you can use distance d to the separating hyper-plane (see CvSVM::predict). This distance d corresponds to a confidence of the classifier. By default the decision boundary is d = 0 but you can manually change it to d = c, where c is a threshold (positive or negative). By varying c you shift the separating hyper-plane in a desired direction.