shap/shap

ENH: Winter Values

Opened this issue · 4 comments

Problem Description

Hi,

I hope to extend SHAP to calculate feature contributions for coalitions of features Owen and Winter values. Having reviewed the Partition Explainer and Permutation Explainer code I am not aware of any current package or method that allows users to calculate these values with context specific coalition structures.

Alternative Solutions

The PartitionExplainer method does provide an approximation of Shapley values by using different hierarchical clustering methods (as default). I aim to use that method as a template to develop this which can take an arbitrary user described nested hierarchy of feature coalitions.

Additional Context

I had seen some interest in providing explanations using shapley values in context where it is reasonable to group features in cases such as of high dimensional data, graph, or multi-modal data. Such as this issue and papers such as Rozemberczki et. al (2022) and Mora et. al (2024). One solution for this is the Winter values as described in Winter (1989) which extends the Owen value to hierarchies of nested coalitions dubbed levels structures. Essentially this is done by a recursive call of the Owen values, those marginal average effects respecting the coalitions structure, through the hierarchical tree of coalitions.

Feature request checklist

  • I have checked the issue tracker for duplicate issues.
  • I'd be interested in making a PR to implement this feature

Thanks for your interest in shap. This sounds interesting and is indeed an useful feature for this library. If we can support you in any way, don't shy away from asking.

Hey. Thanks for the support. I added you to the fork created. I am currently working in the shap\notebooks\Rewriting notebook. If you have any tips or guidelines on code structure to aid review or merging I would appreciate that.

Thanks for adding me. Would be great if you could create a PR, so that we can discuss specific points in the code once you feel you are ready for that or if you are stuck.

Apologies for the slow replies I had a lot of personal commitments over the past weeks. I created a pull request, I would appreciate discussing specific points as I am a beginner developer. Let me know what is the best platform to discuss specific for you.