Closed vijay2492 closed 4 years ago
For mlr models, create the flashlight like below -
fl_rpart_mlr <- flashlight(model = dt_model_mlr, data = train, y = "x1", label = "rpart_mlr", metrics = list(auc = AUC),
predict_function = function(mod, X) predict(model = mod, newdata =X)$data$prob.1)
light_importance function for permutation variable importance is not working with models built using mlr pipeline.
works as expected, but when i build same model on same dataset using mlr package -
I get importance of all the variables = 0.
I checked that output of predict_function is both the cases is same.
Can you highlight, if i am doing something wrong or the package can't be used with mlr models?