Function to optimize the feature set of a mlr3::Learner.

fselect(
  method,
  task,
  learner,
  resampling,
  measure,
  term_evals = NULL,
  term_time = NULL,
  ...
)

Arguments

method

(character(1))
Key to retrieve fselector from mlr_fselectors dictionary.

task

(mlr3::Task)
Task to operate on.

learner

(mlr3::Learner).

resampling

(mlr3::Resampling)
Uninstantiated resamplings are instantiated during construction so that all configurations are evaluated on the same data splits.

measure

(mlr3::Measure)
Measure to optimize.

term_evals

(integer(1))
Number of allowed evaluations.

term_time

(integer(1))
Maximum allowed time in seconds.

...

(named list())
Named arguments to be set as parameters of the fselector.

Value

FSelectInstanceSingleCrit

Examples

task = tsk("pima") instance = fselect( method = "random_search", task = task, learner = lrn("classif.rpart"), resampling = rsmp ("holdout"), measure = msr("classif.ce"), term_evals = 4) # subset task to optimized feature set task$select(instance$result_feature_set)