class_docstr: (Error-Correcting) Output-Code multiclass strategy
  
  Output-code based strategies consist in representing each class with a
  binary code (an array of 0s and 1s). At fitting time, one binary
  classifier per bit in the code book is fitted.  At prediction time, the
  classifiers are used to project new points in the class space and the class
  closest to the points is chosen. The main advantage of these strategies is
  that the number of classifiers used can be controlled by the user, either
  for compressing the model (0 < code_size < 1) or for making the model more
  robust to errors (code_size > 1). See the documentation for more details.
  
  Read more in the :ref:`User Guide <ecoc>`.
  
  Parameters
  ----------
  estimator : estimator object
      An estimator object implementing `fit` and one of `decision_function`
      or `predict_proba`.
  
  code_size : float
      Percentage of the number of classes to be used to create the code book.
      A number between 0 and 1 will require fewer classifiers than
      one-vs-the-rest. A number greater than 1 will require more classifiers
      than one-vs-the-rest.
  
  random_state : numpy.RandomState, optional
      The generator used to initialize the codebook. Defaults to
      numpy.random.
  
  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 `int(n_classes * code_size)` estimators
      Estimators used for predictions.
  
  classes_ : numpy array of shape [n_classes]
      Array containing labels.
  
  code_book_ : numpy array of shape [n_classes, code_size]
      Binary array containing the code of each class.
  
  References
  ----------
  
  .. [1] "Solving multiclass learning problems via error-correcting output
     codes",
     Dietterich T., Bakiri G.,
     Journal of Artificial Intelligence Research 2,
     1995.
  
  .. [2] "The error coding method and PICTs",
     James G., Hastie T.,
     Journal of Computational and Graphical statistics 7,
     1998.
  
  .. [3] "The Elements of Statistical Learning",
     Hastie T., Tibshirani R., Friedman J., page 606 (second-edition)
     2008.
class_docstr_tok: ["(","Error-Correcting",")","Output-Code","multiclass","strategy","Output-code","based","strategies","consist","in","representing","each","class","with","a","binary","code","(","an","array","of","0s","and","1s",")",".","At","fitting","time",",","one","binary","classifier","per","bit","in","the","code","book","is","fitted",".","At","prediction","time",",","the","classifiers","are","used","to","project","new","points","in","the","class","space","and","the","class","closest","to","the","points","is","chosen",".","The","main","advantage","of","these","strategies","is","that","the","number","of","classifiers","used","can","be","controlled","by","the","user",",","either","for","compressing","the","model","(","0","<","code_size","<","1",")","or","for","making","the","model","more","robust","to","errors","(","code_size",">","1",")",".","See","the","documentation","for","more","details",".","Read","more","in","the",":","ref",":","`","User","Guide","<","ecoc",">","`",".","Parameters","--","--","--","--","--","estimator",":","estimator","object","An","estimator","object","implementing","`","fit","`","and","one","of","`","decision_function","`","or","`","predict_proba","`",".","code_size",":","float","Percentage","of","the","number","of","classes","to","be","used","to","create","the","code","book",".","A","number","between","0","and","1","will","require","fewer","classifiers","than","one-vs-the-rest",".","A","number","greater","than","1","will","require","more","classifiers","than","one-vs-the-rest",".","random_state",":","numpy.RandomState",",","optional","The","generator","used","to","initialize","the","codebook",".","Defaults","to","numpy.random",".","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","`","int","(","n_classes","*","code_size",")","`","estimators","Estimators","used","for","predictions",".","classes_",":","numpy","array","of","shape","[","n_classes","]","Array","containing","labels",".","code_book_",":","numpy","array","of","shape","[","n_classes",",","code_size","]","Binary","array","containing","the","code","of","each","class",".","References","--","--","--","--","--","..","[","1","]","``","Solving","multiclass","learning","problems","via","error-correcting","output","codes","''",",","Dietterich","T.",",","Bakiri","G.",",","Journal","of","Artificial","Intelligence","Research","2",",","1995",".","..","[","2","]","``","The","error","coding","method","and","PICTs","''",",","James","G.",",","Hastie","T.",",","Journal","of","Computational","and","Graphical","statistics","7",",","1998",".","..","[","3","]","``","The","Elements","of","Statistical","Learning","''",",","Hastie","T.",",","Tibshirani","R.",",","Friedman","J.",",","page","606","(","second-edition",")","2008","."]
docstr: Predict multi-class targets using underlying estimators.
  
  Parameters
  ----------
  X : (sparse) array-like, shape = [n_samples, n_features]
      Data.
  
  Returns
  -------
  y : numpy array of shape [n_samples]
      Predicted multi-class targets.
code: def predict(self, X):
      """Predict multi-class targets using underlying estimators.
  
      Parameters
      ----------
      X : (sparse) array-like, shape = [n_samples, n_features]
          Data.
  
      Returns
      -------
      y : numpy array of shape [n_samples]
          Predicted multi-class targets.
      """
      check_is_fitted(self, "estimators_")
      Y = np.array([_predict_binary(e, X) for e in self.estimators_]).T
      pred = euclidean_distances(Y, self.code_book_).argmin(axis=1)
      return self.classes_[pred]
  
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 3 for calling the OutputCodeClassifier obj's underlying member method code with example usage: obj.predict(X) and returns: self