shap_values_mtcars: shap value mtcars

Description Usage Format Details

Description

shap value matrix of a h2o.GBM model, which takse mpg as label and the other variables as predictors using mtcars dataset the code to generate the data is as following: data(mtcars) library(h2o) library(dplyr)

Usage

1

Format

An object of class data.frame with 32 rows and 11 columns.

Details

h2o.init() hex <- as.h2o(mtcars) model <- h2o.gbm(setdiff(colnames(mtcars), 'mpg'), mpg',min_rows = 3, training_frame = hex, nfolds = 3) shap_values_mtcars <- h2o.predict_contributions(model, hex)


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