Skip to content

Commit

Permalink
Refactor tests. (#1081)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Raschka <[email protected]>
  • Loading branch information
fkdosilovic and rasbt authored Mar 31, 2024
1 parent 506a4d5 commit 31a9650
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlxtend/evaluate/tests/test_bias_variance_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_01_loss_bagging():
)

tree = DecisionTreeClassifier(random_state=123)
bag = BaggingClassifier(base_estimator=tree, random_state=123)
bag = BaggingClassifier(estimator=tree, random_state=123)
avg_expected_loss, avg_bias, avg_var = bias_variance_decomp(
bag, X_train, y_train, X_test, y_test, loss="0-1_loss", random_seed=123
)
Expand Down Expand Up @@ -91,7 +91,7 @@ def test_mse_bagging():
)

tree = DecisionTreeRegressor(random_state=123)
bag = BaggingRegressor(base_estimator=tree, n_estimators=10, random_state=123)
bag = BaggingRegressor(estimator=tree, n_estimators=10, random_state=123)

avg_expected_loss, avg_bias, avg_var = bias_variance_decomp(
bag, X_train, y_train, X_test, y_test, loss="mse", random_seed=123
Expand Down

0 comments on commit 31a9650

Please sign in to comment.