Failing additivity check in shap_values of CausalForestDML
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
When I input the exact same training set I used to train my CausalForestDML and call shap_values I get the following error:
Exception: Additivity check failed in TreeExplainer! Please ensure the data matrix you passed to the explainer is the same shape that the model was trained on. If your data shape is correct then please report this on GitHub. This check failed because for one of the samples the sum of the SHAP values was -0.335371, while the model output was -0.344933. If this difference is acceptable you can set check_additivity=False to disable this check.
So the data matrix has the correct shape. So an option would be to put check_additivity=False as the error suggests, but it is not possible to pass this argument to shap_values since this is not implemented.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at CausalForestDML.shap_values and trace its call into TreeExplainer, focusing on how arguments are forwarded. Reproduce the additivity-check failure with the training data described in the issue, then verify that the requested additivity option can be passed and that the existing SHAP behavior remains covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100