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 :term:`fit` and one of
      :term:`decision_function` or :term:`predict_proba`.
  
  code_size : float, default=1.5
      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 : int, RandomState instance, default=None
      The generator used to initialize the codebook.
      Pass an int for reproducible output across multiple function calls.
      See :term:`Glossary <random_state>`.
  
  n_jobs : int, default=None
      The number of jobs to use for the computation: the multiclass 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.
  
  Attributes
  ----------
  estimators_ : list of `int(n_classes * code_size)` estimators
      Estimators used for predictions.
  
  classes_ : ndarray of shape (n_classes,)
      Array containing labels.
  
  code_book_ : ndarray of shape (n_classes, `len(estimators_)`)
      Binary array containing the code of each class.
  
  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
  --------
  OneVsRestClassifier : One-vs-all multiclass strategy.
  OneVsOneClassifier : One-vs-one multiclass strategy.
  
  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.
  
  Examples
  --------
  >>> from sklearn.multiclass import OutputCodeClassifier
  >>> from sklearn.ensemble import RandomForestClassifier
  >>> from sklearn.datasets import make_classification
  >>> X, y = make_classification(n_samples=100, n_features=4,
  ...                            n_informative=2, n_redundant=0,
  ...                            random_state=0, shuffle=False)
  >>> clf = OutputCodeClassifier(
  ...     estimator=RandomForestClassifier(random_state=0),
  ...     random_state=0).fit(X, y)
  >>> clf.predict([[0, 0, 0, 0]])
  array([1])
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",":","term",":","`","fit","`","and","one","of",":","term",":","`","decision_function","`","or",":","term",":","`","predict_proba","`",".","code_size",":","float",",","default=1.5","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",":","int",",","RandomState","instance",",","default=None","The","generator","used","to","initialize","the","codebook",".","Pass","an","int","for","reproducible","output","across","multiple","function","calls",".","See",":","term",":","`","Glossary","<","random_state",">","`",".","n_jobs",":","int",",","default=None","The","number","of","jobs","to","use","for","the","computation",":","the","multiclass","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",".","Attributes","--","--","--","--","--","estimators_",":","list","of","`","int","(","n_classes","*","code_size",")","`","estimators","Estimators","used","for","predictions",".","classes_",":","ndarray","of","shape","(","n_classes",",",")","Array","containing","labels",".","code_book_",":","ndarray","of","shape","(","n_classes",",","`","len","(","estimators_",")","`",")","Binary","array","containing","the","code","of","each","class",".","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","--","--","--","--","OneVsRestClassifier",":","One-vs-all","multiclass","strategy",".","OneVsOneClassifier",":","One-vs-one","multiclass","strategy",".","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",".","Examples","--","--","--","--",">",">",">","from","sklearn.multiclass","import","OutputCodeClassifier",">",">",">","from","sklearn.ensemble","import","RandomForestClassifier",">",">",">","from","sklearn.datasets","import","make_classification",">",">",">","X",",","y","=","make_classification","(","n_samples=100",",","n_features=4",",","...","n_informative=2",",","n_redundant=0",",","...","random_state=0",",","shuffle=False",")",">",">",">","clf","=","OutputCodeClassifier","(","...","estimator=RandomForestClassifier","(","random_state=0",")",",","...","random_state=0",")",".fit","(","X",",","y",")",">",">",">","clf.predict","(","[","[","0",",","0",",","0",",","0","]","]",")","array","(","[","1","]",")"]
code: def __init__(
      self, estimator, *, code_size=1.5, random_state=None, n_jobs=None
  ):
      self.estimator = estimator
      self.code_size = code_size
      self.random_state = random_state
      self.n_jobs = n_jobs
  
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 1 to create a new OutputCodeClassifier object from inherited base classes: MetaEstimatorMixin, ClassifierMixin, BaseEstimator with example: obj = OutputCodeClassifier(estimator)