SingleTreePolicyInterpreter should support `sample_weight`
@kbattocchi is already working on this.
Since Mar 7, 2023.
- Dominant language
- Jupyter Notebook
- Stars
- 4.8k
- Forks
- 827
- PR merge metrics
- No merged PRs in 30d
Description
Hi @kbattocchi,
Thanks for all your work on econml!
Is there any specific reason that SingleTreePolicyInterpreter.interpret cannot support the sample_weight param?
The core learning should work: Internally, it could just pass the weights to PolicyTree.fit [0, 1].
From a quick look some peripheral functionality would also need to be adapted:
- The
sample_treatment_costswould need to be multiplied by the weights (or pre-multiplied by the caller). - The
policy_value_andalways_treat_value_would need to be converted to weighted averages.
Am I missing something?
An alternative is using a PolicyTree or DRPolicyTree directly, however, they do not output the CATEs and standard errors like the SingleTreePolicyInterpreter. In other words, the SingleTreePolicyInterpreter has the advantage of conveniently bundling both recommended treatments AND the underlying CATE estimates (along with other functionality like risk preferences and treatment costs).
[0] https://github.com/microsoft/EconML/blob/b84072baff8ee9f44ebd6e19aff3a7194a66b0f4/econml/cate_interpreter/_interpreters.py#L414
[1] https://econml.azurewebsites.net/_autosummary/econml.policy.PolicyTree.html#econml.policy.PolicyTree.fit
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.
Assessment
This issue has not been assessed yet.