interpretml / interpret-community

Interpret Community extends Interpret repository with additional interpretability techniques and utility functions to handle real-world datasets and workflows.
https://interpret-community.readthedocs.io/en/latest/index.html
MIT License
418 stars 85 forks source link

Issue with XGBoost + binary classification when using TreeExplainer #229

Open imatiach-msft opened 4 years ago

imatiach-msft commented 4 years ago

Describe the bug User reported issue. XGBoost + binary classification when using TreeExplainer fails due to bad shape.

SHAP TreeExplainer returns the wrong format for feature contribution values (lightgbm had similar issue but it was already fixed with PR https://github.com/slundberg/shap/pull/690), we have a disabled test here:

https://github.com/interpretml/interpret-community/blob/master/test/test_explain_model.py#L362

The fix requires a PR to SHAP

To Reproduce Steps to reproduce the behavior:

  1. Run TreeExplainer on XGBoost binary classifier
  2. See error

Expected behavior Explanation should be returned

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Any

Smartphone (please complete the following information): Any

Additional context Add any other context about the problem here.

imatiach-msft commented 4 years ago

there was a workaround merged here after a user complaint: https://github.com/interpretml/interpret-community/pull/235 will keep this ticket to track the longer-term fix