diff options
author | Étienne Mollier <emollier@debian.org> | 2023-08-30 22:38:55 +0200 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2023-08-30 22:38:55 +0200 |
commit | b1767888b9faec766869aa9588ebb515b7c36685 (patch) | |
tree | aba8b422d82e9f1eca74786b06ddb40e3aca091b | |
parent | 0b74c56faae10607005d30eb1fd02854a1967601 (diff) |
fix use of obsolete base_estimator AdaBoost attribute
Bug: https://github.com/qiime2/q2-sample-classifier/issues/227
Last-Update: 2023-08-30
The AdaBoostRegressor base_estimator attribute has been renamed "estimator"
in scikit 1.2 onwards.
Last-Update: 2023-08-30
Gbp-Pq: Name convert-estimator.patch
-rw-r--r-- | q2_sample_classifier/tests/test_estimators.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/q2_sample_classifier/tests/test_estimators.py b/q2_sample_classifier/tests/test_estimators.py index f8d9d66..47e07e7 100644 --- a/q2_sample_classifier/tests/test_estimators.py +++ b/q2_sample_classifier/tests/test_estimators.py @@ -398,7 +398,7 @@ class EstimatorsTests(SampleClassifierTestPluginBase): parameter_tuning=True, classification=True, missing_samples='ignore', base_estimator="DecisionTree") self.assertEqual(type(abe.named_steps.est), AdaBoostClassifier) - self.assertEqual(type(abe.named_steps.est.base_estimator), + self.assertEqual(type(abe.named_steps.est.estimator), DecisionTreeClassifier) def test_train_adaboost_extra_trees(self): @@ -408,7 +408,7 @@ class EstimatorsTests(SampleClassifierTestPluginBase): parameter_tuning=True, classification=True, missing_samples='ignore', base_estimator="ExtraTrees") self.assertEqual(type(abe.named_steps.est), AdaBoostClassifier) - self.assertEqual(type(abe.named_steps.est.base_estimator), + self.assertEqual(type(abe.named_steps.est.estimator), ExtraTreeClassifier) # test some invalid inputs/edge cases |