Skip to content

Rework the TreeExplainer. #453

@mmschlk

Description

@mmschlk

Describe the workflow you want to enable

I want to have a very quick computation of Shapley Values and Shapley Interactions for tree-based models. I also want to compute additional state-of-the-art methods like interventional Shapley values and interactions.

References

Describe your proposed solution

Create a new shapiq.tree sub-package implementing the following methods:

  • Implement LinearTreeSHAP for SV and BV.
  • Implement TreeSHAP-IQ only for SII and k-SII limiting the complexity greatly
  • Implement interventional TreeSHAP

Once we have this up and running we could also move shapiq.tree into a seperate package and make it easier for people outside shapiq wanting to use it / contribute to it.

Describe alternatives you've considered, if relevant

  • Alternatives are what we currently have which is not optimal for Shapley Values (takes a lot of time) and is not very extendible.

Additional context

Managing the tree implementation currently is quite a hassle. TreeSHAP-IQ is written generally for Shapley Interactions and the SVs are a special case. This creates quite a lot of overhead, which makes the code run quite slow for SVs/BVs compared to existing libraries (shap).

Impact

High (Major improvement)

Metadata

Metadata

Labels

feature 💡New feature or enhancement request

Projects

Status

🏗 In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions