Description
Using imbalanced-learn==0.10.1 and scikit-learn==1.2.1 or scikit-learn==1.2.2
from imblearn.ensemble import BalancedRandomForestClassifier
clf = BalancedRandomForestClassifier()
clf.fit(X, y)
raises a series of
FutureWarning: Function delayed is deprecated; The function delayed
has been moved from sklearn.utils.fixes
to sklearn.utils.parallel
. This import path will be removed in 1.5.
UserWarning: sklearn.utils.parallel.delayed
should be used with sklearn.utils.parallel.Parallel
to make it possible to propagate the scikit-learn configuration of the current thread to the joblib workers.
This is potentially stemming from
utils.fixes.delayed is deprecated in 1.2.1 and will be removed in 1.5. Instead, import utils.parallel.delayed and use it in conjunction with the newly introduced utils.parallel.Parallel to ensure proper propagation of the scikit-learn configuration to the workers.
as per https://scikit-learn.org/stable/whats_new/v1.2.html#version-1-2-1