h2o.shap.dependency_plot: shap.dependency.plot

Description Usage Arguments Examples

View source: R/h2o_shap.R

Description

shap dependency plot

Usage

1
h2o.shap.dependency_plot(shap_values, X, i, log = F)

Arguments

shap_values

shap value matrix from h2o.predict_contribution

X

original dataset

i

variable to be plotted

log

whether log transformation is required

Examples

1
2
3
4
5
6
plots <- list()
for(i in c('cyl','disp','hp','wt')){
 log <- ifelse(i == 'disp', TRUE, FALSE)
 plots[[i]] <- h2o.shap.dependency_plot(shap_values_mtcars, mtcars, i, log)
}
ggpubr::ggarrange(plotlist = plots, ncol = 2, nrow = 2)

6chaoran/shapvis documentation built on July 29, 2020, 5:31 p.m.