treeshap
0.4.0Compute SHAP Values for Your Tree-Based Models Using the 'TreeSHAP' Algorithm
Overview
An efficient implementation of the 'TreeSHAP' algorithm introduced by Lundberg et al., (2020) doi:10.1038/s42256-019-0138-9. It is capable of calculating SHAP (SHapley Additive exPlanations) values for tree-based models in polynomial time. Currently supported models include 'gbm', 'randomForest', 'ranger', 'xgboost', 'lightgbm'.
Install
Health
- OK2026-08-0413 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- NOTE2026-08-0112 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- OK2026-04-256 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 27%
- Documented parameters
- 99%
- Return-value docs
- 100%
- References docs
- 0%
Downloads
Repository
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Repository practices
6 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/modeloriented/treeshap on 2026-08-16.
Show all practices
Dependencies
Code & Tests
People & History
4 releases. Pick two to compare their code metrics. R releases are shown for context.
- 0.4.0Latest
- unarchivedReturned to CRAN2026-04-24
- RR 4.6.0 released · 2026-04-24
- archivedRemoved from CRAN2025-12-17issues were not corrected in time
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.3.12024-01-22 · diff ↗
- unarchivedReturned to CRAN2024-01-22
- archivedRemoved from CRAN2024-01-11issues were not corrected in time
- 0.3.02023-10-24 · diff ↗
- 0.2.52023-10-01
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2026-04-24
- Total releases
- 4 / 1 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 623 KB / 1 file
- Download size
- 808 KB
- Installed size
- not tracked yet
- With dependencies
- not tracked yet
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("treeshap")This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-08-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.