def test_sample_weight_adaboost_regressor():
 class DummyEstimator(BaseEstimator, ):
  def fit(self, X, y):
   pass
  def predict(self, X):
   return np.zeros(X.shape[0])
 boost = AdaBoostRegressor(DummyEstimator(), n_estimators=3)
 boost.fit(X, y_regr)
 assert_equal(len(boost.estimator_weights_), len(boost.estimator_errors_))

def test_sample_weight_adaboost_regressor ( ) : class DummyEstimator ( BaseEstimator , ) : def fit ( self , X , y ) : pass def predict ( self , X ) : return np . zeros ( X . shape [ 0 ] ) boost = AdaBoostRegressor ( DummyEstimator ( ) , n_estimators = 3 ) boost . fit ( X , y_regr ) assert_equal ( len ( boost . estimator_weights_ ) , len ( boost . estimator_errors_ ) )
adaboostregressor should work without sample_weights in the base estimator the random weighted sampling is done internally in the _boost method in adaboostregressor .