treeshap: Compute SHAP Values for Your Tree-Based Models Using the
'TreeSHAP' Algorithm
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'.
| Version: |
0.4.0 |
| Depends: |
R (≥ 4.1.0) |
| Imports: |
data.table, ggplot2, Rcpp |
| LinkingTo: |
Rcpp |
| Suggests: |
gbm, jsonlite, lightgbm, gpboost, randomForest, ranger, scales, survival, testthat, xgboost |
| Published: |
2026-04-24 |
| DOI: |
10.32614/CRAN.package.treeshap |
| Author: |
Michael Mayer [aut, cre],
Konrad Komisarczyk [aut],
Pawel Kozminski [aut],
Szymon Maksymiuk
[aut],
Lorenz A. Kapsner
[ctb],
Mikolaj Spytek
[ctb],
Mateusz Krzyzinski
[ctb],
Przemyslaw Biecek
[aut, cph] |
| Maintainer: |
Michael Mayer <mayermichael79 at gmail.com> |
| BugReports: |
https://github.com/ModelOriented/treeshap/issues |
| License: |
GPL-3 |
| URL: |
https://modeloriented.github.io/treeshap/,
https://github.com/ModelOriented/treeshap |
| NeedsCompilation: |
yes |
| Materials: |
NEWS |
| CRAN checks: |
treeshap results |
Documentation:
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=treeshap
to link to this page.