csinva / imodels

Interpretable ML package 🔍 for concise, transparent, and accurate predictive modeling (sklearn-compatible).
https://csinva.io/imodels
MIT License
1.36k stars 121 forks source link

tree_generator can not support RuleFitClassifier #79

Closed Yannahhh closed 2 years ago

Yannahhh commented 2 years ago

Hello~ I find when I use the RuleFitClassifier with the parameter tree_generator, there are some problems:

In your document, you have mentioned that the value Must be GradientBoostingRegressor or GradientBoostingClassifier.

But when I am doing it, it has errors to remind me to use RandomForest and BoostingRegressor.

I want to confirm whether the tree_generote can not support the classifier??? Or is my wrong to use it, can you give an example about how to do so? Thanks!!

My errors: image

csinva commented 2 years ago

Hello 👋 Thanks for your interest in the package!

Sorry we had accidentally set this check to only take in GradientBoostingRegressor / RandomForestRegressor, but it should work just fine with GradientBosstingClassifier. Just removed the check, so if you update the package (pip install --upgrade imodels), it should work now!

Thanks, Chandan