csinva / imodels

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

How to extract rules from FIGSClassifier ? #189

Open frankl1 opened 1 year ago

frankl1 commented 1 year ago

Hi,

I am trying to use the FIGSClassifier for a binary classification. I set the maximum number of rules, I can plot the trees, but how can I get the generated rules. If possible, with their confidence?

Regards

xhxt2008 commented 1 year ago

a same question in BoostedRulesClassifier. I cant get rules as the tutoril book

image

mepland commented 1 year ago

For FIGS, you can follow the example in figs_demo.ipynb which uses extract_sklearn_tree_from_figs() and SKompiler to extract the rules for individual trees.

frankl1 commented 3 months ago

Thanks, I will have a look. Are there plan to unify how rules are extracted from any imodels model ? I can see there is a Rule class in the code, but it is not used consistently in the package.