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 calculate shapley values for HSTreeClassifier #202

Open victor-ML opened 7 months ago

victor-ML commented 7 months ago

In figure 6 from the paper SHAP summary plots are created for HSTreeClassifier and compared against those from sklearn's RandomForestClassifier. That's exactly what I want to do. However when I plug it to the TreeExplainer I get:

InvalidModelError: Model type not yet supported by TreeExplainer: <class 'imodels.tree.hierarchical_shrinkage.HSTreeClassifier'>

I did my best to search in the repo for some kindof shap wrapper and found nothing. Help? Thanks!