micahmelling / auto-shap

MIT License
11 stars 1 forks source link

Shap values for XGBoost Classifier as probabilities #1

Closed Jurgita-DS closed 1 year ago

Jurgita-DS commented 1 year ago

Hi, I was wondering if there is a way to obtain shap values for XGBoost Classifier expressed as probabilities? It looks like they are displayed in different units by default since the values go beyond [0, 1] range.

micahmelling commented 1 year ago

Sorry for the delay in responding! I think this should be possible. Let me check into it and report back.

micahmelling commented 1 year ago

@Jurgita-DS, I have released auto-shap 0.2.1. In this version, boosting classifiers will automatically have the SHAP values in probabilities rather than log odds. I hope this helps! Let me know if you run into any issues.

https://pypi.org/project/auto-shap/

Jurgita-DS commented 1 year ago

@micahmelling that's great, thank you! I will test it in the next couple of weeks.