From f95438af1f4195d74a106496fa3c3c003f6ab959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Karlo=20Do=C5=A1ilovi=C4=87?= Date: Sat, 20 Jan 2024 21:02:50 +0100 Subject: [PATCH] Refactor tests. --- mlxtend/evaluate/tests/test_bias_variance_decomp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlxtend/evaluate/tests/test_bias_variance_decomp.py b/mlxtend/evaluate/tests/test_bias_variance_decomp.py index eb17c0511..e6929fc59 100644 --- a/mlxtend/evaluate/tests/test_bias_variance_decomp.py +++ b/mlxtend/evaluate/tests/test_bias_variance_decomp.py @@ -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 ) @@ -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