Principle:Interpretml Interpret SHAP Tree Explanation
Metadata
| Field | Value |
|---|---|
| Sources | Paper: TreeSHAP, Interpretml_Interpret |
| Domains | Interpretability, Feature_Attribution |
| Updated | 2026-02-07 |
Overview
TreeSHAP computes exact Shapley values for tree-based models in polynomial time using the tree structure to enumerate feature coalitions efficiently.
Description
SHAP Tree Explanation uses the TreeSHAP algorithm to compute exact Shapley values for tree-based models (random forests, gradient boosted trees, etc.) by exploiting the tree structure. Unlike KernelSHAP which approximates Shapley values for any model, TreeSHAP provides exact values in O(TLD^2) time where T is the number of trees, L is the maximum number of leaves, and D is the maximum depth. This makes it substantially faster and more accurate than model-agnostic approaches for tree-based models.
Usage
Use SHAP Tree Explanation when you need local feature attributions for tree-based models. It provides exact Shapley values and is much faster than KernelSHAP for supported model types. Requires the shap package.