skope-rules
skope-rules copied to clipboard
BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator'
Dear Team,
I am running the titanic demo notebook and getting the below error in the code
skope_rules_clf.fit(X_train, y_train)
in SkopeRules.fit(self, X, y, sample_weight)
265 self._max_depths = self.max_depth
266 if isinstance(self.max_depth, Iterable) else [self.max_depth]
268 for max_depth in self.max_depths:
--> 269 bagging_clf = BaggingClassifier(
270 base_estimator=DecisionTreeClassifier(
271 max_depth=max_depth,
272 max_features=self.max_features,
273 min_samples_split=self.min_samples_split),
274 n_estimators=self.n_estimators,
275 max_samples=self.max_samples,
276 max_features=self.max_samples_features,
277 bootstrap=self.bootstrap,
278 bootstrap_features=self.bootstrap_features,
279 # oob_score=... XXX may be added
280 # if selection on tree perf needed.
281 # warm_start=... XXX may be added to increase computation perf.
282 n_jobs=self.n_jobs,
283 random_state=self.random_state,
284 verbose=self.verbose)
286 bagging_reg = BaggingRegressor(
287 base_estimator=DecisionTreeRegressor(
288 max_depth=max_depth,
(...)
300 random_state=self.random_state,
301 verbose=self.verbose)
303 clfs.append(bagging_clf)
TypeError: BaggingClassifier.init() got an unexpected keyword argument 'base_estimator'