AllPairs

class AllPairs[source]

The All-Pairs multiclass extension.

In the all-pairs reduction, one trains \(k(k−1)/2\) binary classifiers for a \(k\)-way multiclass problem; each receives the samples of a pair of classes from the original training set, and must learn to distinguish these two classes. At prediction time, a weighted voting scheme is used: all \(k(k−1)/2\) classifiers are applied to an unseen sample, and each class gets assigned the sum of all the scores obtained by the various classifiers. The combined classifier returns as a result the class getting the highest value.

Methods

AllPairs.predict(x)

Applying multiple estimators for prediction.

AllPairs.set_estimator(estimator_cls[, params])

Called internally to set Estimator and parameters :type estimator_cls: Callable[[List], Estimator] :param estimator_cls: An Estimator class :type params: Optional[List] :param params: Parameters for the estimator

AllPairs.test(x, y)

Testing multiple estimators each for distinguishing a pair of classes.

AllPairs.train(x, y)

Training multiple estimators each for distinguishing a pair of classes.