Skip to content

feat(interpret): add TreeSHAP for fast exact SHAP values on tree models - #3

Merged
yasmramos merged 2 commits into
mainfrom
develop
Jul 14, 2026
Merged

feat(interpret): add TreeSHAP for fast exact SHAP values on tree models#3
yasmramos merged 2 commits into
mainfrom
develop

Conversation

@yasmramos

Copy link
Copy Markdown
Owner
  • Implement TreeSHAP algorithm for DecisionTree, RandomForest classifiers and regressors
  • Add getTrees() public method to RandomForestClassifier and RandomForestRegressor
  • Create TreeSHAPExample demonstrating usage with Iris dataset
  • TreeSHAP provides O(T*L²) complexity vs O(2^M) for Kernel SHAP
  • Support for explain(), explainBatch(), and meanAbsoluteShap() methods
  • Include expected value computation and SHAP value verification

This enables production-ready model interpretability for tree-based models
with significant performance improvements over model-agnostic approaches.

- Implement TreeSHAP algorithm for DecisionTree, RandomForest classifiers and regressors
- Add getTrees() public method to RandomForestClassifier and RandomForestRegressor
- Create TreeSHAPExample demonstrating usage with Iris dataset
- TreeSHAP provides O(T*L²) complexity vs O(2^M) for Kernel SHAP
- Support for explain(), explainBatch(), and meanAbsoluteShap() methods
- Include expected value computation and SHAP value verification

This enables production-ready model interpretability for tree-based models
with significant performance improvements over model-agnostic approaches.
@yasmramos
yasmramos merged commit 4b0c4a4 into main Jul 14, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant