CausalForestDML SHAP values not working properly
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I am using econml version 0.10.0 and shap v. 0.39.0
When I calculate SHAP values for CausalForestDML estimator the results do not make sense, as opposed to when I calculate them the same way on other estimators like DRL/Meta-learners.
Here is a brief description of my issue:
Y = ['event_flag']
T = ['Diabetes_A1c_Test_compliance_category_Non-Compliant']
So I am able to access my shap values using: shap.plots.bar(shap_values[Y[0]][T[0]+'_1.0']) for non-CausalForestDML models, however, for CausalForestDML the shap values take a different form:
shap.plots.bar(shap_values['Y0']['T0_1.0']), even though everything else has been set up the same
Additonally, the results dont make sense:
For example, for DRL I see about what I expect: (clear directional relationships between the impact and the value of the feature, for the most part)

But for DML (built the same way, only difference is the estimator used), the results are not at all what I would expect: (very little directional relationships)

Thanks!
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
No source file or test is identified in the report. Start by reproducing the CausalForestDML case with the stated EconML and SHAP versions, then compare its SHAP value structure and plots with the DRL or meta-learner cases using shap.plots.bar. Done is not defined beyond making the CausalForestDML results behave as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100