'Check the estimator and the n_estimator attribute, set the
`base_estimator_` attribute.'

def _validate_estimator(self, default=None):

    if (not isinstance(self.n_estimators, (numbers.Integral, np.integer))):
        raise ValueError('n_estimators    must    be    an    integer,    got    {0}.'.format(type(self.n_estimators)))
    if (self.n_estimators <= 0):
        raise ValueError('n_estimators    must    be    greater    than    zero,    got    {0}.'.format(self.n_estimators))
    if (self.base_estimator is not None):
        self.base_estimator_ = self.base_estimator
    else:
        self.base_estimator_ = default
    if (self.base_estimator_ is None):
        raise ValueError('base_estimator    cannot    be    None')
