As it si asked I import the BalancedBaggingClassifier, use HistGradientBoostingClassifier
as a base_estimator
and fix the hyperparameter n_estimators
to 50, the code is:
from imblearn.ensemble import BalancedBaggingClassifier
balanc_bagclas = BalancedBaggingClassifier(
base_estimator_=HistGradientBoostingClassifier, n_estimators=50
)
cv_results = cross_validate(
balanc_bagclas, data, target, cv=10, scoring="balanced_accuracy", n_jobs=2,
return_estimator=True,
)
cv_results["test_score"].mean()
but I get:
TypeError: __init__() got an unexpected keyword argument 'base_estimator_'
Can you help me? thanks