imodels
imodels copied to clipboard
how to visualize rules for *Rule*-methods where there is no method ".vizualize()"
Hi!
There are methods such as: SkopeRulesClassifier BoostedRulesClassifier BayesianRuleSetClassifier OptimalRuleListClassifier BayesianRuleListClassifier GreedyRuleListClassifier FIGS Classifier FIGSRegressor etc
Which sort of return a list of rules, but which don't have a convenient method."vizualize()" as for RuleFitClassifier, RuleFitRegressor.
How can I get a list of rules received as a Data Frame for them?
I was trying to get a clear output set through running this example:
https://csinva.io/imodels/rule_set/skope_rules.html
and on your own dataset:
- Dataset: data.csv
- Code: scope_rules_1_myself.txt (please, change *.txt ext to *.ipynb)
Unfortunately, the result is a bit unreadable:

Hello 👋, thanks for your interest in this package!
Thanks for this comment, will work on getting a clear and consistent visualization for the models some time this week!
I've started adding support for different models simply in the __str__ function. So if you have a model m (e.g. m=FIGSClassifier), you can call str(m) or print(m) to visualize it.
The demo notebook now shows examples of how to visualize most of the models.