Open be-marc opened 2 days ago
learner = lrn("classif.rpart")
task = tsk("iris")
resampling = rsmp("cv", folds = 3)
extractor = function(learner) list(selected_features = setdiff(learner$model$frame$var, "<leaf>"))
rr = resample(task, learner, resampling, extractor = extractor)
rr$learners[[1]]$state$selected_features
Closes https://github.com/mlr-org/mlr3/issues/1013 and https://github.com/mlr-org/mlr3/issues/899