@glemaitre When using the BalancedBaggingClassifier using sklearn=1.4 as the backend, I encountered
TypeError: BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator'
Looking further, inside imblearn/ensemble/_bagging.py the following code snippet may be responsible.
# TODO: remove when supporting scikit-learn>=1.2
bagging_classifier_signature = inspect.signature(super().__init__)
estimator_params = {"base_estimator": base_estimator}
if "estimator" in bagging_classifier_signature.parameters:
estimator_params["estimator"] = estimator
else:
self.estimator = estimator
Perhaps, as the TODO suggests, this snippet needs to be adjusted since we're way past sklearn=1.2?
EDIT: Perhaps, the issue is even deeper. I tried commenting parts of the above snippet, but still run into a similar base_estimator parameter error during parameter validation steps incurred by some of the parent classes for BalancedBaggingClassifier.
EDIT2: Okay, so the fixes are being worked on in the development branch. I installed the 0.12-dev from this git repository, and things seem to be working.
@glemaitre When using the
BalancedBaggingClassifier
usingsklearn=1.4
as the backend, I encounteredLooking further, inside
imblearn/ensemble/_bagging.py
the following code snippet may be responsible.Perhaps, as the TODO suggests, this snippet needs to be adjusted since we're way past
sklearn=1.2
?EDIT: Perhaps, the issue is even deeper. I tried commenting parts of the above snippet, but still run into a similar
base_estimator
parameter error during parameter validation steps incurred by some of the parent classes for BalancedBaggingClassifier.EDIT2: Okay, so the fixes are being worked on in the development branch. I installed the
0.12-dev
from this git repository, and things seem to be working.