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: Partially fit underlying estimators.
  
  Should be used when memory is inefficient to train all data.
  Chunks of data can be passed in several iteration.
  
  Parameters
  ----------
  X : {array-like, sparse matrix} of shape (n_samples, n_features)
      Data.
  
  y : {array-like, sparse matrix} of shape (n_samples,) or (n_samples, n_classes)
      Multi-class targets. An indicator matrix turns on multilabel
      classification.
  
  classes : array, shape (n_classes, )
      Classes across all calls to partial_fit.
      Can be obtained via `np.unique(y_all)`, where y_all is the
      target vector of the entire dataset.
      This argument is only required in the first call of partial_fit
      and can be omitted in the subsequent calls.
  
  Returns
  -------
  self : object
      Instance of partially fitted estimator.
code: def partial_fit(self, X, y, classes=None):
      """Partially fit underlying estimators.
  
      Should be used when memory is inefficient to train all data.
      Chunks of data can be passed in several iteration.
  
      Parameters
      ----------
      X : {array-like, sparse matrix} of shape (n_samples, n_features)
          Data.
  
      y : {array-like, sparse matrix} of shape (n_samples,) or (n_samples, n_classes)
          Multi-class targets. An indicator matrix turns on multilabel
          classification.
  
      classes : array, shape (n_classes, )
          Classes across all calls to partial_fit.
          Can be obtained via `np.unique(y_all)`, where y_all is the
          target vector of the entire dataset.
          This argument is only required in the first call of partial_fit
          and can be omitted in the subsequent calls.
  
      Returns
      -------
      self : object
          Instance of partially fitted estimator.
      """
      if _check_partial_fit_first_call(self, classes):
          if not hasattr(self.estimator, "partial_fit"):
              raise ValueError(
                  (
                      "Base estimator {0}, doesn't have partial_fit method"
                  ).format(self.estimator)
              )
          self.estimators_ = [
              clone(self.estimator) for _ in range(self.n_classes_)
          ]
  
          # A sparse LabelBinarizer, with sparse_output=True, has been
          # shown to outperform or match a dense label binarizer in all
          # cases and has also resulted in less or equal memory consumption
          # in the fit_ovr function overall.
          self.label_binarizer_ = LabelBinarizer(sparse_output=True)
          self.label_binarizer_.fit(self.classes_)
  
      if len(np.setdiff1d(y, self.classes_)):
          raise ValueError(
              (
                  "Mini-batch contains {0} while classes "
                  + "must be subset of {1}"
              ).format(np.unique(y), self.classes_)
          )
  
      Y = self.label_binarizer_.transform(y)
      Y = Y.tocsc()
      columns = (col.toarray().ravel() for col in Y.T)
  
      self.estimators_ = Parallel(n_jobs=self.n_jobs)(
          delayed(_partial_fit_binary)(estimator, X, column)
          for estimator, column in zip(self.estimators_, columns)
      )
  
      if hasattr(self.estimators_[0], "n_features_in_"):
          self.n_features_in_ = self.estimators_[0].n_features_in_
  
      return self
  
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.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 _num_samples, check_is_fitted
label_desc: Use image node_id 3 for calling the OneVsRestClassifier obj's underlying member method code with example usage: obj.partial_fit(X, y, classes) and returns: self