shap.importance {SHAPforxgboost} | R Documentation |
Variable importance as measured by mean absolute SHAP value.
Description
Variable importance as measured by mean absolute SHAP value.
Usage
shap.importance(data_long, names_only = FALSE, top_n = Inf)
Arguments
data_long |
a long format data of SHAP values from
|
names_only |
If |
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
shap.importance(shap_long_iris)
shap.importance(shap_long_iris, names_only = 1)
[Package SHAPforxgboost version 0.1.3 Index]