Closed pbiecek closed 5 years ago
Yes, previously I've fixed names of parameters for predict_function
as x
and data
. Now it should work for any names.
Now it works even without converting factors into numeric vectors
# load datasets
library("DALEX2")
Y_train <- HR$status
x_train <- HR[ , -6]
# Let's build a model
library("randomForest")
set.seed(123)
model_rf <- randomForest(x = x_train, y = Y_train)
# here DALEX starts
library("DALEX2")
rf_explainer <- explain(model_rf, data = x_train)
# here shapper starts
library("shapper")
ive <- individual_variable_effect(rf_explainer,
new_observation = x_train[1,])
plot(ive)
Any idea why this is not working?