OVR (OnevsRestClassifier)
One-vs-the-rest (OvR) multiclass strategy.
This strategy consists in fitting one binary classifier per class. The computational complexity for both learning and predicting grows linearly with the number of classes. Not recommended for very large number of classes.
Parameters
-
base_model(
Model
) → A binary classifier, although a multi-class classifier will work too. -
n_classes(
int
) → The number of classes for the classifier.
Example Usage
import turboml as tb
htc_model = tb.HoeffdingTreeClassifier(n_classes=2)
ovr_model = tb.OVR(n_classes = 7, base_model = htc_model)