-
Notifications
You must be signed in to change notification settings - Fork 3
Error in [.data.frame(data, , x) : undefined columns selected #98
Copy link
Copy link
Open
Description
Hi, I'm trying to run xspline and getting this error on passing a simple ranger model to xspline(). I'm suspecting that the issue might be there with this call (this is the only place where data is subsetted):
classes <- get_predictors_classes(data[, predictors])
Here is a reproducible example:
> temp_data <- data.frame(a = rnorm(n = 1000), b = rnorm(n = 1000), y = sample(x = c(TRUE, FALSE), size = 1000, replace = TRUE))
> model_rf <- ranger::ranger(formula = factor(y) ~ ., data = temp_data, min.node.size = 5, importance = "permutation", probability = TRUE)
> xs <- xspliner::xspline(model_rf, data = temp_data)
Error in `[.data.frame`(data, , x) : undefined columns selected
> explainer_rf <- DALEX::explain(model_rf, y = temp_data$y, data = temp_data)
> xs <- xspliner::xspline(explainer_rf, data = temp_data)
Error in `[.data.frame`(data, , x) : undefined columns selected
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels