sklearn.multiclass.predict_ovr¶
- sklearn.multiclass.predict_ovr(*args, **kwargs)[source]¶
DEPRECATED: predict_ovr is deprecated and will be removed in 0.18.Use the OneVsRestClassifier instead.
Predict multi-class targets using the one vs rest strategy.
Parameters: estimators : list of n_classes estimators, Estimators used for
predictions. The list must be homogeneous with respect to the type of estimators. fit_ovr supplies this list as part of its output.
- label_binarizer : LabelBinarizer object, Object used to transform
multiclass labels to binary labels and vice-versa. fit_ovr supplies this object as part of its output.
- X : (sparse) array-like, shape = [n_samples, n_features]
Data.
Returns: y : (sparse) array-like, shape = [n_samples] or [n_samples, n_classes].
Predicted multi-class targets.