You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I also encounter with this problem. Can you tell me how to fixed the parameter ("estimator") function or test demo? Thank you very much!
You have to locate the skope_rules.py file in your python environment (the path to it is usually written in the error message you get when trying to run this function).
Open the file in a text editor of your choice and replace every instance of the base_estimator keyword with estimator and save it. This should then allow the code to run as intended.
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'
The text was updated successfully, but these errors were encountered: