Learn R Programming

treeshap (version 0.3.1)

Compute SHAP Values for Your Tree-Based Models Using the 'TreeSHAP' Algorithm

Description

An efficient implementation of the 'TreeSHAP' algorithm introduced by Lundberg et al., (2020) . 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'.

Copy Link

Version

Install

install.packages('treeshap')

Monthly Downloads

507

Version

0.3.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Mateusz Krzyzinski

Last Published

January 22nd, 2024

Functions in treeshap (0.3.1)

plot_contribution

SHAP value based Break-Down plot
plot_feature_importance

SHAP value based Feature Importance plot
print.treeshap_multioutput

Prints treeshap_multioutput objects
print.treeshap

Prints treeshap objects
ranger.unify

Unify ranger model
predict.model_unified

Predict
randomForest.unify

Unify randomForest model
print.model_unified

Prints model_unified objects
print.model_unified_multioutput

Prints model_unified_multioutput objects
ranger_surv.unify

Unify ranger survival model
plot_interaction

SHAP Interaction value plot
xgboost.unify

Unify XGBoost model
treeshap_multioutput.object

treeshap results for multi-output model
treeshap

Calculate SHAP values of a tree ensemble model.
treeshap.object

treeshap results
unify

Unify tree-based model
theme_drwhy

DrWhy Theme for ggplot objects
set_reference_dataset

Set reference dataset
gbm.unify

Unify GBM model
model_unified_multioutput.object

Unified model representations for multi-output model
lightgbm.unify

Unify LightGBM model
model_unified.object

Unified model representation
fifa20

Attributes of all players in FIFA 20
is.treeshap

Check whether object is a valid treeshap object
colors_discrete_drwhy

DrWhy color palettes for ggplot objects
plot_feature_dependence

SHAP value based Feature Dependence plot
is.model_unified

Check whether object is a valid model_unified object