class_docstr: An AdaBoost regressor.
  
  An AdaBoost [1] regressor is a meta-estimator that begins by fitting a
  regressor on the original dataset and then fits additional copies of the
  regressor on the same dataset but where the weights of instances are
  adjusted according to the error of the current prediction. As such,
  subsequent regressors focus more on difficult cases.
  
  This class implements the algorithm known as AdaBoost.R2 [2].
  
  Read more in the :ref:`User Guide <adaboost>`.
  
  Parameters
  ----------
  base_estimator : object, optional (default=DecisionTreeRegressor)
      The base estimator from which the boosted ensemble is built.
      Support for sample weighting is required.
  
  n_estimators : integer, optional (default=50)
      The maximum number of estimators at which boosting is terminated.
      In case of perfect fit, the learning procedure is stopped early.
  
  learning_rate : float, optional (default=1.)
      Learning rate shrinks the contribution of each regressor by
      ``learning_rate``. There is a trade-off between ``learning_rate`` and
      ``n_estimators``.
  
  loss : {'linear', 'square', 'exponential'}, optional (default='linear')
      The loss function to use when updating the weights after each
      boosting iteration.
  
  random_state : int, RandomState instance or None, optional (default=None)
      If int, random_state is the seed used by the random number generator;
      If RandomState instance, random_state is the random number generator;
      If None, the random number generator is the RandomState instance used
      by `np.random`.
  
  Attributes
  ----------
  estimators_ : list of classifiers
      The collection of fitted sub-estimators.
  
  estimator_weights_ : array of floats
      Weights for each estimator in the boosted ensemble.
  
  estimator_errors_ : array of floats
      Regression error for each estimator in the boosted ensemble.
  
  feature_importances_ : array of shape = [n_features]
      The feature importances if supported by the ``base_estimator``.
  
  See also
  --------
  AdaBoostClassifier, GradientBoostingRegressor, DecisionTreeRegressor
  
  References
  ----------
  .. [1] Y. Freund, R. Schapire, "A Decision-Theoretic Generalization of
         on-Line Learning and an Application to Boosting", 1995.
  
  .. [2] H. Drucker, "Improving Regressors using Boosting Techniques", 1997.
class_docstr_tok: ["An","AdaBoost","regressor",".","An","AdaBoost","[","1","]","regressor","is","a","meta-estimator","that","begins","by","fitting","a","regressor","on","the","original","dataset","and","then","fits","additional","copies","of","the","regressor","on","the","same","dataset","but","where","the","weights","of","instances","are","adjusted","according","to","the","error","of","the","current","prediction",".","As","such",",","subsequent","regressors","focus","more","on","difficult","cases",".","This","class","implements","the","algorithm","known","as","AdaBoost.R2","[","2","]",".","Read","more","in","the",":","ref",":","`","User","Guide","<","adaboost",">","`",".","Parameters","--","--","--","--","--","base_estimator",":","object",",","optional","(","default=DecisionTreeRegressor",")","The","base","estimator","from","which","the","boosted","ensemble","is","built",".","Support","for","sample","weighting","is","required",".","n_estimators",":","integer",",","optional","(","default=50",")","The","maximum","number","of","estimators","at","which","boosting","is","terminated",".","In","case","of","perfect","fit",",","the","learning","procedure","is","stopped","early",".","learning_rate",":","float",",","optional","(","default=1",".",")","Learning","rate","shrinks","the","contribution","of","each","regressor","by","``","learning_rate","``",".","There","is","a","trade-off","between","``","learning_rate","``","and","``","n_estimators","``",".","loss",":","{","'linear","'",",","'square","'",",","'exponential","'","}",",","optional","(","default='linear","'",")","The","loss","function","to","use","when","updating","the","weights","after","each","boosting","iteration",".","random_state",":","int",",","RandomState","instance","or","None",",","optional","(","default=None",")","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",";","If","RandomState","instance",",","random_state","is","the","random","number","generator",";","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","Attributes","--","--","--","--","--","estimators_",":","list","of","classifiers","The","collection","of","fitted","sub-estimators",".","estimator_weights_",":","array","of","floats","Weights","for","each","estimator","in","the","boosted","ensemble",".","estimator_errors_",":","array","of","floats","Regression","error","for","each","estimator","in","the","boosted","ensemble",".","feature_importances_",":","array","of","shape","=","[","n_features","]","The","feature","importances","if","supported","by","the","``","base_estimator","``",".","See","also","--","--","--","--","AdaBoostClassifier",",","GradientBoostingRegressor",",","DecisionTreeRegressor","References","--","--","--","--","--","..","[","1","]","Y.","Freund",",","R.","Schapire",",","``","A","Decision-Theoretic","Generalization","of","on-Line","Learning","and","an","Application","to","Boosting","''",",","1995",".","..","[","2","]","H.","Drucker",",","``","Improving","Regressors","using","Boosting","Techniques","''",",","1997","."]
docstr: Check the estimator and set the base_estimator_ attribute.
docstr_tok: ["Check","the","estimator","and","set","the","base_estimator_","attribute","."]
code: def _validate_estimator(self):
      """Check the estimator and set the base_estimator_ attribute."""
      super(AdaBoostRegressor, self)._validate_estimator(
          default=DecisionTreeRegressor(max_depth=3)
      )
  
imports: from abc import ABCMeta, abstractmethod
  import numpy
  from numpy.core.umath_tests import inner1d
  from .base import BaseEnsemble
  from ..base import ClassifierMixin, RegressorMixin, is_regressor
  from ..externals import six
  from ..externals.six.moves import zip
  from ..externals.six.moves import xrange
  from .forest import BaseForest
  from ..tree import DecisionTreeClassifier, DecisionTreeRegressor
  from ..tree.tree import BaseDecisionTree
  from ..tree._tree import DTYPE
  from ..utils import check_array, check_X_y, check_random_state
  from ..metrics import accuracy_score, r2_score
  from sklearn.utils.validation import has_fit_parameter, check_is_fitted
label_desc: Use image node_id 3 for calling the AdaBoostRegressor obj's underlying member method code with example usage: obj._validate_estimator() without return types