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
{{ message }}
Repository navigation
BaggingClassifier.__init__() got an unexpected keyword argument 'base_estimator' #68
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.
Activity
Lapsis-glitch commentedon Jul 11, 2024
I ran into the same issue, it seems to stem from sklearn modifying the function parameters.
This can be fixed if you go into the code and change "base_estimator" to "estimator".
on linux you can do this with:
sed -i 's/base_estimator=/estimator=/g' path/to/your/environment/lib/python3.XX/site-packages/skrules/skope_rules.py
liang623589326 commentedon Sep 25, 2024
I also encounter with this problem. Can you tell me how to fixed the parameter ("estimator") function or test demo? Thank you very much!
Lapsis-glitch commentedon Sep 25, 2024
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.
liang623589326 commentedon Sep 28, 2024
Thank you so much. I've done with you help.
yousseftarhri commentedon Jan 29, 2025
base_estimatorwas renamed toestimatorin version 1.2 and will be removed in 1.4.Fix compatibility with scikit-learn 1.4+ / NumPy 2.x / Python 3.12