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

n.trees error with variable_response() function on gbm object #44

Closed
kransom14 opened this issue Sep 20, 2018 · 1 comment
Closed

n.trees error with variable_response() function on gbm object #44

kransom14 opened this issue Sep 20, 2018 · 1 comment

Comments

@kransom14
Copy link

kransom14 commented Sep 20, 2018

This issue is related to a previous one: #4

I get an n.trees error even when passing the n.trees argument to variable_response() with an explainer created on a gbm model object.

library(gbm)
library(DALEX)
library(breakDown)

# create a gbm model
model <- gbm(quality ~ pH + residual.sugar + sulphates + alcohol, data = wine,
             distribution = "gaussian",
             n.trees = 1000,
             interaction.depth = 4,
             shrinkage = 0.01,
             n.minobsinnode = 10,
             verbose = FALSE)

# make an explainer for the model
explainer_gbm <- explain(model, data = wine)

# single variable
exp_sgn <- variable_response(explainer_gbm, variable = "alcohol", n.trees = 1000)

Error in paste("Using", n.trees, "trees...\n") : 
  argument "n.trees" is missing, with no default](url)

@kransom14
Copy link
Author

I realized this issue has already been addressed for variable_importance() and has the same solution: #35

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

No branches or pull requests

1 participant