Filter which uses the predictive performance of a mlr3::Learner as filter score. Performs a mlr3::resample() for each feature separately. The filter score is the aggregated performance of the mlr3::Measure, or the negated aggregated performance if the measure has to be minimized.

Format

R6::R6Class inheriting from Filter.

Construction

FilterPerformance$new(learner = mlr3::lrn("classif.rpart"),
  resampling = mlr3::rsmp("holdout"), measure = mlr3::msr("classif.ce"))
mlr_filters$get("performance")
flt("performance")

See also

Examples

task = mlr3::tsk("iris") learner = mlr3::lrn("classif.rpart") filter = flt("performance", learner = learner) filter$calculate(task) as.data.table(filter)
#> feature score #> 1: Petal.Width -0.02 #> 2: Petal.Length -0.10 #> 3: Sepal.Length -0.30 #> 4: Sepal.Width -0.54