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

Rulefix complexity & gosdt inheritance #72

Closed keyan3 closed 2 years ago

keyan3 commented 2 years ago

Rulefit complexity wasn't counting linear terms when include_linear=True

Gosdt always inheriting from GreedyTreeClassifier can cause issues when you actually have gosdt installed, e.g. the print method will expect some attributes that specific to GreedyTreeClassifier and not created by OptimalTreeClassifier.fit. I switched it to the corels approach where we check if gosdt is supported before picking the parent class.