| shap.importance {SHAPforxgboost} | R Documentation |
Variable importance as measured by mean absolute SHAP value.
shap.importance(data_long, names_only = FALSE, top_n = Inf)
data_long |
a long format data of SHAP values from
|
names_only |
If |
top_n |
How many variables to be returned? |
returns data.table with average absolute SHAP
values per variable, sorted in decreasing order of importance.
shap.importance(shap_long_iris) shap.importance(shap_long_iris, names_only = 1)