class_docstr: Base class for all ensemble classes.
  
  Warning: This class should not be used directly. Use derived classes
  instead.
  
  Parameters
  ----------
  estimator : object
      The base estimator from which the ensemble is built.
  
  n_estimators : int, default=10
      The number of estimators in the ensemble.
  
  estimator_params : list of str, default=tuple()
      The list of attributes to use as parameters when instantiating a
      new base estimator. If none are given, default parameters are used.
  
  base_estimator : object, default="deprecated"
      Use `estimator` instead.
  
      .. deprecated:: 1.2
          `base_estimator` is deprecated and will be removed in 1.4.
          Use `estimator` instead.
  
  Attributes
  ----------
  estimator_ : estimator
      The base estimator from which the ensemble is grown.
  
  base_estimator_ : estimator
      The base estimator from which the ensemble is grown.
  
      .. deprecated:: 1.2
          `base_estimator_` is deprecated and will be removed in 1.4.
          Use `estimator_` instead.
  
  estimators_ : list of estimators
      The collection of fitted base estimators.
docstr: Check the base estimator.
  
  Sets the `estimator_` attributes.
docstr_tok: ["Check","the","base","estimator",".","Sets","the","`","estimator_","`","attributes","."]
code: def _validate_estimator(self, default=None):
      """Check the base estimator.
  
      Sets the `estimator_` attributes.
      """
      if self.estimator is not None and (
          self.base_estimator not in [None, "deprecated"]
      ):
          raise ValueError(
              "Both `estimator` and `base_estimator` were set. Only set `estimator`."
          )
  
      if self.estimator is not None:
          self.estimator_ = self.estimator
      elif self.base_estimator != "deprecated":
          warnings.warn(
              (
                  "`base_estimator` was renamed to `estimator` in version 1.2 and "
                  "will be removed in 1.4."
              ),
              FutureWarning,
          )
          if self.base_estimator is not None:
              self.estimator_ = self.base_estimator
          else:
              self.estimator_ = default
      else:
          self.estimator_ = default
  
imports: import warnings
  from abc import ABCMeta, abstractmethod
  from typing import List
  import numpy
  from joblib import effective_n_jobs
  from ..base import BaseEstimator, MetaEstimatorMixin, clone, is_classifier, is_regressor
  from ..utils import Bunch, _print_elapsed_time, check_random_state, deprecated
  from ..utils.metaestimators import _BaseComposition
label_desc: Use image node_id 2 for calling the BaseEnsemble obj's underlying member method code with example usage: obj._validate_estimator(default) without return types