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'm attaching the line of code and the error as reference. My code uses sklearn and when i tried to use the same in scikit learn it is not working. (Jupyter Labs)
bagging_classifier = BaggingClassifier(base_estimator=base_classifier, n_estimators=n_estimators,
bootstrap_features=False, max_samples=1.0, max_features=1.0,
bootstrap=True, oob_score=False, n_jobs=None,
warm_start=False, random_state=42, verbose=0)
I'm attaching the line of code and the error as reference. My code uses sklearn and when i tried to use the same in scikit learn it is not working. (Jupyter Labs)
bagging_classifier = BaggingClassifier(base_estimator=base_classifier, n_estimators=n_estimators,
bootstrap_features=False, max_samples=1.0, max_features=1.0,
bootstrap=True, oob_score=False, n_jobs=None,
warm_start=False, random_state=42, verbose=0)
TypeError Traceback (most recent call last)
Cell In[13], line 20
17 n_estimators = 10
19 # Create the Bagging classifier
---> 20 bagging_classifier = BaggingClassifier(base_estimator=base_classifier, n_estimators=n_estimators,
21 bootstrap_features=False, max_samples=1.0, max_features=1.0,
22 bootstrap=True, oob_score=False, n_jobs=None,
23 warm_start=False, random_state=42, verbose=0)
25 # Train the Bagging classifier
26 bagging_classifier.fit(X_train, y_train)
TypeError: BaggingClassifier.init() got an unexpected keyword argument 'base_estimator'
The text was updated successfully, but these errors were encountered: