Fork me on GitHub

This documentation is for scikit-learn version 0.16.1Other versions

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

sklearn.multiclass.fit_ecoc

sklearn.multiclass.fit_ecoc(*args, **kwargs)[source]

DEPRECATED: fit_ecoc is deprecated and will be removed in 0.18.Use the OutputCodeClassifier instead.

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.