class_docstr: One-vs-the-rest (OvR) multiclass strategy.
  
  Also known as one-vs-all, this strategy consists in fitting one classifier
  per class. For each classifier, the class is fitted against all the other
  classes. In addition to its computational efficiency (only `n_classes`
  classifiers are needed), one advantage of this approach is its
  interpretability. Since each class is represented by one and one classifier
  only, it is possible to gain knowledge about the class by inspecting its
  corresponding classifier. This is the most commonly used strategy for
  multiclass classification and is a fair default choice.
  
  OneVsRestClassifier can also be used for multilabel classification. To use
  this feature, provide an indicator matrix for the target `y` when calling
  `.fit`. In other words, the target labels should be formatted as a 2D
  binary (0/1) matrix, where [i, j] == 1 indicates the presence of label j
  in sample i. This estimator uses the binary relevance method to perform
  multilabel classification, which involves training one binary classifier
  independently for each label.
  
  Read more in the :ref:`User Guide <ovr_classification>`.
  
  Parameters
  ----------
  estimator : estimator object
      A regressor or a classifier that implements :term:`fit`.
      When a classifier is passed, :term:`decision_function` will be used
      in priority and it will fallback to :term:`predict_proba` if it is not
      available.
      When a regressor is passed, :term:`predict` is used.
  
  n_jobs : int, default=None
      The number of jobs to use for the computation: the `n_classes`
      one-vs-rest problems are computed in parallel.
  
      ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context.
      ``-1`` means using all processors. See :term:`Glossary <n_jobs>`
      for more details.
  
      .. versionchanged:: 0.20
         `n_jobs` default changed from 1 to None
  
  verbose : int, default=0
      The verbosity level, if non zero, progress messages are printed.
      Below 50, the output is sent to stderr. Otherwise, the output is sent
      to stdout. The frequency of the messages increases with the verbosity
      level, reporting all iterations at 10. See :class:`joblib.Parallel` for
      more details.
  
      .. versionadded:: 1.1
  
  Attributes
  ----------
  estimators_ : list of `n_classes` estimators
      Estimators used for predictions.
  
  classes_ : array, shape = [`n_classes`]
      Class labels.
  
  n_classes_ : int
      Number of classes.
  
  label_binarizer_ : LabelBinarizer object
      Object used to transform multiclass labels to binary labels and
      vice-versa.
  
  multilabel_ : boolean
      Whether a OneVsRestClassifier is a multilabel classifier.
  
  n_features_in_ : int
      Number of features seen during :term:`fit`. Only defined if the
      underlying estimator exposes such an attribute when fit.
  
      .. versionadded:: 0.24
  
  feature_names_in_ : ndarray of shape (`n_features_in_`,)
      Names of features seen during :term:`fit`. Only defined if the
      underlying estimator exposes such an attribute when fit.
  
      .. versionadded:: 1.0
  
  See Also
  --------
  OneVsOneClassifier : One-vs-one multiclass strategy.
  OutputCodeClassifier : (Error-Correcting) Output-Code multiclass strategy.
  sklearn.multioutput.MultiOutputClassifier : Alternate way of extending an
      estimator for multilabel classification.
  sklearn.preprocessing.MultiLabelBinarizer : Transform iterable of iterables
      to binary indicator matrix.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sklearn.multiclass import OneVsRestClassifier
  >>> from sklearn.svm import SVC
  >>> X = np.array([
  ...     [10, 10],
  ...     [8, 10],
  ...     [-5, 5.5],
  ...     [-5.4, 5.5],
  ...     [-20, -20],
  ...     [-15, -20]
  ... ])
  >>> y = np.array([0, 0, 1, 1, 2, 2])
  >>> clf = OneVsRestClassifier(SVC()).fit(X, y)
  >>> clf.predict([[-19, -20], [9, 9], [-5, 5]])
  array([2, 0, 1])
class_docstr_tok: ["One-vs-the-rest","(","OvR",")","multiclass","strategy",".","Also","known","as","one-vs-all",",","this","strategy","consists","in","fitting","one","classifier","per","class",".","For","each","classifier",",","the","class","is","fitted","against","all","the","other","classes",".","In","addition","to","its","computational","efficiency","(","only","`","n_classes","`","classifiers","are","needed",")",",","one","advantage","of","this","approach","is","its","interpretability",".","Since","each","class","is","represented","by","one","and","one","classifier","only",",","it","is","possible","to","gain","knowledge","about","the","class","by","inspecting","its","corresponding","classifier",".","This","is","the","most","commonly","used","strategy","for","multiclass","classification","and","is","a","fair","default","choice",".","OneVsRestClassifier","can","also","be","used","for","multilabel","classification",".","To","use","this","feature",",","provide","an","indicator","matrix","for","the","target","`","y","`","when","calling","`",".fit","`",".","In","other","words",",","the","target","labels","should","be","formatted","as","a","2D","binary","(","0\/1",")","matrix",",","where","[","i",",","j","]","==","1","indicates","the","presence","of","label","j","in","sample","i",".","This","estimator","uses","the","binary","relevance","method","to","perform","multilabel","classification",",","which","involves","training","one","binary","classifier","independently","for","each","label",".","Read","more","in","the",":","ref",":","`","User","Guide","<","ovr_classification",">","`",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","A","regressor","or","a","classifier","that","implements",":","term",":","`","fit","`",".","When","a","classifier","is","passed",",",":","term",":","`","decision_function","`","will","be","used","in","priority","and","it","will","fallback","to",":","term",":","`","predict_proba","`","if","it","is","not","available",".","When","a","regressor","is","passed",",",":","term",":","`","predict","`","is","used",".","n_jobs",":","int",",","default=None","The","number","of","jobs","to","use","for","the","computation",":","the","`","n_classes","`","one-vs-rest","problems","are","computed","in","parallel",".","``","None","``","means","1","unless","in","a",":","obj",":","`","joblib.parallel_backend","`","context",".","``","-1","``","means","using","all","processors",".","See",":","term",":","`","Glossary","<","n_jobs",">","`","for","more","details",".","..","versionchanged",":",":","0.20","`","n_jobs","`","default","changed","from","1","to","None","verbose",":","int",",","default=0","The","verbosity","level",",","if","non","zero",",","progress","messages","are","printed",".","Below","50",",","the","output","is","sent","to","stderr",".","Otherwise",",","the","output","is","sent","to","stdout",".","The","frequency","of","the","messages","increases","with","the","verbosity","level",",","reporting","all","iterations","at","10",".","See",":","class",":","`","joblib.Parallel","`","for","more","details",".","..","versionadded",":",":","1.1","Attributes","--","--","--","--","--","estimators_",":","list","of","`","n_classes","`","estimators","Estimators","used","for","predictions",".","classes_",":","array",",","shape","=","[","`","n_classes","`","]","Class","labels",".","n_classes_",":","int","Number","of","classes",".","label_binarizer_",":","LabelBinarizer","object","Object","used","to","transform","multiclass","labels","to","binary","labels","and","vice-versa",".","multilabel_",":","boolean","Whether","a","OneVsRestClassifier","is","a","multilabel","classifier",".","n_features_in_",":","int","Number","of","features","seen","during",":","term",":","`","fit","`",".","Only","defined","if","the","underlying","estimator","exposes","such","an","attribute","when","fit",".","..","versionadded",":",":","0.24","feature_names_in_",":","ndarray","of","shape","(","`","n_features_in_","`",",",")","Names","of","features","seen","during",":","term",":","`","fit","`",".","Only","defined","if","the","underlying","estimator","exposes","such","an","attribute","when","fit",".","..","versionadded",":",":","1.0","See","Also","--","--","--","--","OneVsOneClassifier",":","One-vs-one","multiclass","strategy",".","OutputCodeClassifier",":","(","Error-Correcting",")","Output-Code","multiclass","strategy",".","sklearn.multioutput.MultiOutputClassifier",":","Alternate","way","of","extending","an","estimator","for","multilabel","classification",".","sklearn.preprocessing.MultiLabelBinarizer",":","Transform","iterable","of","iterables","to","binary","indicator","matrix",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","sklearn.multiclass","import","OneVsRestClassifier",">",">",">","from","sklearn.svm","import","SVC",">",">",">","X","=","np.array","(","[","...","[","10",",","10","]",",","...","[","8",",","10","]",",","...","[","-5",",","5.5","]",",","...","[","-5.4",",","5.5","]",",","...","[","-20",",","-20","]",",","...","[","-15",",","-20","]","...","]",")",">",">",">","y","=","np.array","(","[","0",",","0",",","1",",","1",",","2",",","2","]",")",">",">",">","clf","=","OneVsRestClassifier","(","SVC","(",")",")",".fit","(","X",",","y",")",">",">",">","clf.predict","(","[","[","-19",",","-20","]",",","[","9",",","9","]",",","[","-5",",","5","]","]",")","array","(","[","2",",","0",",","1","]",")"]
docstr: Indicate if wrapped estimator is using a precomputed Gram matrix
docstr_tok: ["Indicate","if","wrapped","estimator","is","using","a","precomputed","Gram","matrix"]
code: def _more_tags(self):
      """Indicate if wrapped estimator is using a precomputed Gram matrix"""
      return {"pairwise": _safe_tags(self.estimator, key="pairwise")}
  
imports: import array
  import itertools
  import warnings
  from numbers import Integral, Real
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
  from .metrics.pairwise import pairwise_distances_argmin
  from .preprocessing import LabelBinarizer
  from .utils import check_random_state
  from .utils._param_validation import HasMethods, Interval
  from .utils._tags import _safe_tags
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, process_routing
  from .utils.metaestimators import _safe_split, available_if
  from .utils.multiclass import _check_partial_fit_first_call, _ovr_decision_function, check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_method_params, _num_samples, check_is_fitted
label_desc: Use image node_id 9 for calling the OneVsRestClassifier obj's underlying member method code with example usage: obj._more_tags() and returns: dict