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_ovr

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

DEPRECATED: fit_ovr is deprecated and will be removed in 0.18.Use the OneVsRestClassifier instead.

Fit a one-vs-the-rest strategy.

Parameters:

estimator : estimator object

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

X : (sparse) array-like, shape = [n_samples, n_features]

Data.

y : (sparse) array-like, shape = [n_samples] or [n_samples, n_classes]

Multi-class targets. An indicator matrix turns on multilabel classification.

Returns:

estimators : list of estimators object

The list of fitted estimator.

lb : fitted LabelBinarizer