Skip to content

Commit

Permalink
fix deprecated base_estimator
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleongari committed Jul 9, 2024
1 parent 7903f00 commit 45b656d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/plot_mpg_svr.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
# Create RandomForestRegressor
n_estimators = 1000
mpg_bagger = BaggingRegressor(
base_estimator=SVR(), n_estimators=n_estimators, random_state=42
estimator=SVR(), n_estimators=n_estimators, random_state=42
)
mpg_bagger.fit(mpg_X_train, mpg_y_train)
mpg_y_hat = mpg_bagger.predict(mpg_X_test)
Expand Down
2 changes: 1 addition & 1 deletion forestci/tests/test_forestci.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_bagging_svr_error():
X_train = X[train_idx]

n_trees = 4
bagger = BaggingRegressor(base_estimator=SVR(), n_estimators=n_trees)
bagger = BaggingRegressor(estimator=SVR(), n_estimators=n_trees)
bagger.fit(X_train, y_train)
inbag = fci.calc_inbag(X_train.shape[0], bagger)
for ib in [inbag, None]:
Expand Down

0 comments on commit 45b656d

Please sign in to comment.