csinva / imodels

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

Bug in Readme: Hierarchical Shrinkage Doesn't Support HistGradientBoostingRegressor #137

Closed bridgream closed 1 year ago

bridgream commented 1 year ago

The readme page claims that hierarchical shrinkage supports any sklearn tree-based model, but in reality it only works with sklearn.ensemble.GradientBoostingRegressor and sklearn.ensemble.GradientBoostingClassifier. When used with sklearn.ensemble.HistGradientBoostingRegressor, the _shrink method is nullified because neither of the two conditions is true: https://github.com/csinva/imodels/blob/master/imodels/tree/hierarchical_shrinkage.py#L125-L127 . This is same for HistGradientBoostingClassifier.

We should either add support to hist boosting trees, or clarify this in the readme.

csinva commented 1 year ago

Thanks for pointing this out! I've just updated this in the readme and we'll try and support HistGradientBoostingRegressor soon!