class_docstr: One-vs-the-rest (OvR) multiclass/multilabel 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.
  
  This strategy can also be used for multilabel learning, where a classifier
  is used to predict multiple labels for instance, by fitting on a 2-d matrix
  in which cell [i, j] is 1 if sample i has label j and 0 otherwise.
  
  In the multilabel learning literature, OvR is also known as the binary
  relevance method.
  
  Read more in the :ref:`User Guide <ovr_classification>`.
  
  Parameters
  ----------
  estimator : estimator object
      An estimator object implementing `fit` and one of `decision_function`
      or `predict_proba`.
  
  n_jobs : int, optional, default: 1
      The number of jobs to use for the computation. If -1 all CPUs are used.
      If 1 is given, no parallel computing code is used at all, which is
      useful for debugging. For n_jobs below -1, (n_cpus + 1 + n_jobs) are
      used. Thus for n_jobs = -2, all CPUs but one are used.
  
  Attributes
  ----------
  estimators_ : list of `n_classes` estimators
      Estimators used for predictions.
  
  classes_ : array, shape = [`n_classes`]
      Class labels.
  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.
class_docstr_tok: ["One-vs-the-rest","(","OvR",")","multiclass\/multilabel","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",".","This","strategy","can","also","be","used","for","multilabel","learning",",","where","a","classifier","is","used","to","predict","multiple","labels","for","instance",",","by","fitting","on","a","2-d","matrix","in","which","cell","[","i",",","j","]","is","1","if","sample","i","has","label","j","and","0","otherwise",".","In","the","multilabel","learning","literature",",","OvR","is","also","known","as","the","binary","relevance","method",".","Read","more","in","the",":","ref",":","`","User","Guide","<","ovr_classification",">","`",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","An","estimator","object","implementing","`","fit","`","and","one","of","`","decision_function","`","or","`","predict_proba","`",".","n_jobs",":","int",",","optional",",","default",":","1","The","number","of","jobs","to","use","for","the","computation",".","If","-1","all","CPUs","are","used",".","If","1","is","given",",","no","parallel","computing","code","is","used","at","all",",","which","is","useful","for","debugging",".","For","n_jobs","below","-1",",","(","n_cpus","+","1","+","n_jobs",")","are","used",".","Thus","for","n_jobs","=","-2",",","all","CPUs","but","one","are","used",".","Attributes","--","--","--","--","--","estimators_",":","list","of","`","n_classes","`","estimators","Estimators","used","for","predictions",".","classes_",":","array",",","shape","=","[","`","n_classes","`","]","Class","labels",".","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","."]
code: def coef_(self):
      check_is_fitted(self, "estimators_")
      if not hasattr(self.estimators_[0], "coef_"):
          raise AttributeError(
              "Base estimator doesn't have a coef_ attribute."
          )
      coefs = [e.coef_ for e in self.estimators_]
      if sp.issparse(coefs[0]):
          return sp.vstack(coefs)
      return np.vstack(coefs)
  
imports: import array
  import numpy
  import warnings
  import scipy.sparse
  import itertools
  from .base import BaseEstimator, ClassifierMixin, clone, is_classifier
  from .base import MetaEstimatorMixin, is_regressor
  from .preprocessing import LabelBinarizer
  from .metrics.pairwise import euclidean_distances
  from .utils import check_random_state
  from .utils.validation import _num_samples
  from .utils.validation import check_is_fitted
  from .utils.validation import check_X_y
  from .utils.multiclass import _check_partial_fit_first_call, check_classification_targets, _ovr_decision_function
  from .utils.metaestimators import _safe_split
  from .externals.joblib import Parallel
  from .externals.joblib import delayed
  from .externals.six.moves import zip
label_desc: Use image node_id 9 for calling the OneVsRestClassifier obj's underlying member method code with example usage: obj.coef_() and returns: np, sp