Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in plot_explanations() function with a regression model - Error in combine_vars(data, params$plot_env, vars, drop = params$drop) : At least one layer must contain all variables used for facetting #60

andresrcs opened this issue Dec 5, 2017 · 1 comment


Copy link

Hi, does plot_explanations() work with regression models? if it does, what am I doing wrong?

Here is a reproducible example:


dataset_url <- ""
sales_aug <- readRDS(gzcon(url(dataset_url)))

train <- sales_aug %>% filter(month <= 8)
valid <- sales_aug %>% filter(month == 9)
test <- sales_aug %>% filter(month == 10)

train <- as.h2o(train)
valid <- as.h2o(valid)
test <- as.h2o(test)

y <- "amount"
x <- setdiff(names(train), y)

leaderboard <- h2o.automl(x, y, training_frame = train, validation_frame = valid, leaderboard_frame = test, max_runtime_secs = 30, stopping_metric = "deviance", seed = 12345)

model <- leaderboard@leader

explainer <- lime([,-1]), model)
#> Warning: Data contains numeric columns with zero variance
explanation <- explain([1:5,-1]), explainer, n_features = 5)

#> Error in combine_vars(data, params$plot_env, vars, drop = params$drop): At least one layer must contain all variables used for facetting
Copy link

You're doing nothing wrong - thanks for reporting it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants