8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8690fd4 commit f9c4ce3Copy full SHA for f9c4ce3
sklearn/ensemble/_base.py
@@ -157,15 +157,18 @@ def _validate_estimator(self, default=None):
157
158
if self.estimator is not None:
159
self.estimator_ = self.estimator
160
- elif self.base_estimator not in [None, "deprecated"]:
+ elif self.base_estimator != "deprecated":
161
warnings.warn(
162
(
163
"`base_estimator` was renamed to `estimator` in version 1.2 and "
164
"will be removed in 1.4."
165
),
166
FutureWarning,
167
)
168
- self.estimator_ = self.base_estimator
+ if self.base_estimator is not None:
169
+ self.estimator_ = self.base_estimator
170
+ else:
171
+ self.estimator_ = default
172
else:
173
self.estimator_ = default
174
0 commit comments