shap.importance: Variable importance as measured by mean absolute SHAP value.

Description Usage Arguments Value Examples

View source: R/SHAP_funcs.R

Description

Variable importance as measured by mean absolute SHAP value.

Usage

1
shap.importance(data_long, names_only = FALSE, top_n = Inf)

Arguments

data_long

a long format data of SHAP values from shap.prep

names_only

If TRUE, returns variable names only.

top_n

How many variables to be returned?

Value

returns data.table with average absolute SHAP values per variable, sorted in decreasing order of importance.

Examples

1
2
3

SHAPforxgboost documentation built on March 28, 2021, 9:06 a.m.