class_docstr: A multi-label model that arranges regressions into a chain.
  
  Each model makes a prediction in the order specified by the chain using
  all of the available features provided to the model plus the predictions
  of models that are earlier in the chain.
  
  Read more in the :ref:`User Guide <regressorchain>`.
  
  .. versionadded:: 0.20
  
  Parameters
  ----------
  base_estimator : estimator
      The base estimator from which the regressor chain is built.
  
  order : array-like of shape (n_outputs,) or 'random', default=None
      If `None`, the order will be determined by the order of columns in
      the label matrix Y.::
  
          order = [0, 1, 2, ..., Y.shape[1] - 1]
  
      The order of the chain can be explicitly set by providing a list of
      integers. For example, for a chain of length 5.::
  
          order = [1, 3, 2, 4, 0]
  
      means that the first model in the chain will make predictions for
      column 1 in the Y matrix, the second model will make predictions
      for column 3, etc.
  
      If order is 'random' a random ordering will be used.
  
  cv : int, cross-validation generator or an iterable, default=None
      Determines whether to use cross validated predictions or true
      labels for the results of previous estimators in the chain.
      Possible inputs for cv are:
  
      - None, to use true labels when fitting,
      - integer, to specify the number of folds in a (Stratified)KFold,
      - :term:`CV splitter`,
      - An iterable yielding (train, test) splits as arrays of indices.
  
  random_state : int, RandomState instance or None, optional (default=None)
      If ``order='random'``, determines random number generation for the
      chain order.
      In addition, it controls the random seed given at each `base_estimator`
      at each chaining iteration. Thus, it is only used when `base_estimator`
      exposes a `random_state`.
      Pass an int for reproducible output across multiple function calls.
      See :term:`Glossary <random_state>`.
  
  verbose : bool, default=False
      If True, chain progress is output as each model is completed.
  
      .. versionadded:: 1.2
  
  Attributes
  ----------
  estimators_ : list
      A list of clones of base_estimator.
  
  order_ : list
      The order of labels in the classifier chain.
  
  n_features_in_ : int
      Number of features seen during :term:`fit`. Only defined if the
      underlying `base_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`. Defined only when `X`
      has feature names that are all strings.
  
      .. versionadded:: 1.0
  
  See Also
  --------
  ClassifierChain : Equivalent for classification.
  MultiOutputRegressor : Learns each output independently rather than
      chaining.
  
  Examples
  --------
  >>> from sklearn.multioutput import RegressorChain
  >>> from sklearn.linear_model import LogisticRegression
  >>> logreg = LogisticRegression(solver='lbfgs',multi_class='multinomial')
  >>> X, Y = [[1, 0], [0, 1], [1, 1]], [[0, 2], [1, 1], [2, 0]]
  >>> chain = RegressorChain(base_estimator=logreg, order=[0, 1]).fit(X, Y)
  >>> chain.predict(X)
  array([[0., 2.],
         [1., 1.],
         [2., 0.]])
class_docstr_tok: ["A","multi-label","model","that","arranges","regressions","into","a","chain",".","Each","model","makes","a","prediction","in","the","order","specified","by","the","chain","using","all","of","the","available","features","provided","to","the","model","plus","the","predictions","of","models","that","are","earlier","in","the","chain",".","Read","more","in","the",":","ref",":","`","User","Guide","<","regressorchain",">","`",".","..","versionadded",":",":","0.20","Parameters","--","--","--","--","--","base_estimator",":","estimator","The","base","estimator","from","which","the","regressor","chain","is","built",".","order",":","array-like","of","shape","(","n_outputs",",",")","or","'random","'",",","default=None","If","`","None","`",",","the","order","will","be","determined","by","the","order","of","columns","in","the","label","matrix","Y.",":",":","order","=","[","0",",","1",",","2",",","...",",","Y.shape","[","1","]","-","1","]","The","order","of","the","chain","can","be","explicitly","set","by","providing","a","list","of","integers",".","For","example",",","for","a","chain","of","length","5.",":",":","order","=","[","1",",","3",",","2",",","4",",","0","]","means","that","the","first","model","in","the","chain","will","make","predictions","for","column","1","in","the","Y","matrix",",","the","second","model","will","make","predictions","for","column","3",",","etc",".","If","order","is","'random","'","a","random","ordering","will","be","used",".","cv",":","int",",","cross-validation","generator","or","an","iterable",",","default=None","Determines","whether","to","use","cross","validated","predictions","or","true","labels","for","the","results","of","previous","estimators","in","the","chain",".","Possible","inputs","for","cv","are",":","-","None",",","to","use","true","labels","when","fitting",",","-","integer",",","to","specify","the","number","of","folds","in","a","(","Stratified",")","KFold",",","-",":","term",":","`","CV","splitter","`",",","-","An","iterable","yielding","(","train",",","test",")","splits","as","arrays","of","indices",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","``","order='random","'","``",",","determines","random","number","generation","for","the","chain","order",".","In","addition",",","it","controls","the","random","seed","given","at","each","`","base_estimator","`","at","each","chaining","iteration",".","Thus",",","it","is","only","used","when","`","base_estimator","`","exposes","a","`","random_state","`",".","Pass","an","int","for","reproducible","output","across","multiple","function","calls",".","See",":","term",":","`","Glossary","<","random_state",">","`",".","verbose",":","bool",",","default=False","If","True",",","chain","progress","is","output","as","each","model","is","completed",".","..","versionadded",":",":","1.2","Attributes","--","--","--","--","--","estimators_",":","list","A","list","of","clones","of","base_estimator",".","order_",":","list","The","order","of","labels","in","the","classifier","chain",".","n_features_in_",":","int","Number","of","features","seen","during",":","term",":","`","fit","`",".","Only","defined","if","the","underlying","`","base_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","`",".","Defined","only","when","`","X","`","has","feature","names","that","are","all","strings",".","..","versionadded",":",":","1.0","See","Also","--","--","--","--","ClassifierChain",":","Equivalent","for","classification",".","MultiOutputRegressor",":","Learns","each","output","independently","rather","than","chaining",".","Examples","--","--","--","--",">",">",">","from","sklearn.multioutput","import","RegressorChain",">",">",">","from","sklearn.linear_model","import","LogisticRegression",">",">",">","logreg","=","LogisticRegression","(","solver='lbfgs","'",",","multi_class='multinomial","'",")",">",">",">","X",",","Y","=","[","[","1",",","0","]",",","[","0",",","1","]",",","[","1",",","1","]","]",",","[","[","0",",","2","]",",","[","1",",","1","]",",","[","2",",","0","]","]",">",">",">","chain","=","RegressorChain","(","base_estimator=logreg",",","order=","[","0",",","1","]",")",".fit","(","X",",","Y",")",">",">",">","chain.predict","(","X",")","array","(","[","[","0.",",","2",".","]",",","[","1.",",","1",".","]",",","[","2.",",","0",".","]","]",")"]
docstr: Get metadata routing of this object.
  
  Please check :ref:`User Guide <metadata_routing>` on how the routing
  mechanism works.
  
  .. versionadded:: 1.3
  
  Returns
  -------
  routing : MetadataRouter
      A :class:`~sklearn.utils.metadata_routing.MetadataRouter` encapsulating
      routing information.
code: def get_metadata_routing(self):
      """Get metadata routing of this object.
  
      Please check :ref:`User Guide <metadata_routing>` on how the routing
      mechanism works.
  
      .. versionadded:: 1.3
  
      Returns
      -------
      routing : MetadataRouter
          A :class:`~sklearn.utils.metadata_routing.MetadataRouter` encapsulating
          routing information.
      """
      router = MetadataRouter(owner=self.__class__.__name__).add(
          estimator=self.base_estimator,
          method_mapping=MethodMapping().add(
              callee="fit", caller="fit"
          ),
      )
      return router
  
imports: from abc import ABCMeta, abstractmethod
  from numbers import Integral
  import numpy
  import scipy.sparse
  from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, RegressorMixin, _fit_context, clone, is_classifier
  from .model_selection import cross_val_predict
  from .utils import Bunch, _print_elapsed_time, check_random_state
  from .utils._param_validation import HasMethods, StrOptions
  from .utils.metadata_routing import MetadataRouter, MethodMapping, _routing_enabled, process_routing
  from .utils.metaestimators import available_if
  from .utils.multiclass import check_classification_targets
  from .utils.parallel import Parallel, delayed
  from .utils.validation import _check_fit_params, check_is_fitted, has_fit_parameter
label_desc: Use image node_id 2 for calling the RegressorChain obj's underlying member method code with example usage: obj.get_metadata_routing() and returns: router