Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Metric for binary classification (deviance is the default). Check documentation here http://docs.h2o.ai/h2o/latest-stable/h2o-docs/automl.html | |
automl_model <- h2o.automl(#x = x, | |
y = 'y', | |
balance_classes = TRUE, | |
training_frame = df_frame_split[[1]], | |
nfolds = 4, | |
#validation_frame = df_frame_split[[2]], # read help(h2o.automl) !!!Optional. This argument is ignored unless the user sets nfolds = 0!!! | |
leaderboard_frame = df_frame_split[[2]], | |
max_runtime_secs = 60 * 2, # Two minutes | |
#exclude_algos = "StackedEnsemble", # Global Importance of Stacked models is tricky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SHAP values: http://docs.h2o.ai/h2o/latest-stable/h2o-r/docs/reference/predict_contributions.H2OModel.html | |
SHAP_values <- predict_contributions.H2OModel(aml_leader, df_frame_split[[2]]) | |
# Wrangling inspired here: https://bradleyboehmke.github.io/HOML/iml.html | |
shap_df <- SHAP_values %>% | |
as.data.frame() %>% | |
select(-BiasTerm) %>% | |
gather(feature, shap_value) %>% |