OneAgainstRest¶
- class OneAgainstRest[source]¶
The One Against Rest multiclass extension.
For an \(n\)-class problem, the one-against-rest method constructs \(n\) SVM classifiers, with the \(i\)-th classifier separating class \(i\) from all the remaining classes, \(\forall i \in \{1, 2, \ldots, n\}\). When the \(n\) classifiers are combined to make the final decision, the classifier that generates the highest value from its decision function is selected as the winner and the corresponding class label is returned.
Methods
Applying multiple estimators for prediction.
OneAgainstRest.set_estimator
(estimator_cls)Called internally to set
Estimator
and parameters :type estimator_cls:Callable
[[List
],Estimator
] :param estimator_cls: AnEstimator
class :type params:Optional
[List
] :param params: Parameters for the estimatorOneAgainstRest.test
(x, y)Testing multiple estimators each for distinguishing a pair of classes.
OneAgainstRest.train
(x, y)Training multiple estimators each for distinguishing a pair of classes.