This documentation is for scikit-learn version 0.10Other versions

Citing

If you use the software, please consider citing scikit-learn.

This page

8.18.9. sklearn.multiclass.fit_ecoc

sklearn.multiclass.fit_ecoc(estimator, X, y, code_size=1.5, random_state=None)

Fit an error-correcting output-code strategy.

Parameters :

estimator : estimator object

An estimator object implementing fit and one of decision_function or predict_proba.

code_size: float, optional :

Percentage of the number of classes to be used to create the code book.

random_state: numpy.RandomState, optional :

The generator used to initialize the codebook. Defaults to numpy.random.

Returns :

estimators : list of int(n_classes * code_size) estimators

Estimators used for predictions.

classes : numpy array of shape [n_classes]

Array containing labels.

code_book_: numpy array of shape [n_classes, code_size] :

Binary array containing the code of each class.