FSelectorExhaustiveSearch class that implements an Exhaustive Search.

In order to support general termination criteria and parallelization, feature sets are evaluated in batches. The size of the feature sets is increased by 1 in each batch.

Dictionary

This FSelector can be instantiated via the dictionary mlr_fselectors or with the associated sugar function fs():

mlr_fselectors$get("exhaustive_search")
fs("exhaustive_search")

Parameters

max_features

integer(1)
Maximum number of features. By default, number of features in mlr3::Task.

Super class

mlr3fselect::FSelector -> FSelectorExhaustiveSearch

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage

FSelectorExhaustiveSearch$new()


Method clone()

The objects of this class are cloneable with this method.

Usage

FSelectorExhaustiveSearch$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(mlr3) terminator = trm("evals", n_evals = 5) instance = FSelectInstanceSingleCrit$new( task = tsk("iris"), learner = lrn("classif.rpart"), resampling = rsmp("holdout"), measure = msr("classif.ce"), terminator = terminator ) fselector = fs("exhaustive_search") # \donttest{ # Modifies the instance by reference fselector$optimize(instance)
#> Petal.Length Petal.Width Sepal.Length Sepal.Width features classif.ce #> 1: TRUE FALSE FALSE FALSE Petal.Length 0.02
# Returns best scoring evaluation instance$result
#> Petal.Length Petal.Width Sepal.Length Sepal.Width features classif.ce #> 1: TRUE FALSE FALSE FALSE Petal.Length 0.02
# Allows access of data.table of full path of all evaluations as.data.table(instance$archive)# }
#> Petal.Length Petal.Width Sepal.Length Sepal.Width classif.ce #> 1: TRUE FALSE FALSE FALSE 0.02 #> 2: FALSE TRUE FALSE FALSE 0.04 #> 3: FALSE FALSE TRUE FALSE 0.22 #> 4: FALSE FALSE FALSE TRUE 0.44 #> 5: TRUE TRUE FALSE FALSE 0.04 #> 6: TRUE FALSE TRUE FALSE 0.02 #> 7: TRUE FALSE FALSE TRUE 0.02 #> 8: FALSE TRUE TRUE FALSE 0.04 #> 9: FALSE TRUE FALSE TRUE 0.04 #> 10: FALSE FALSE TRUE TRUE 0.22 #> runtime_learners timestamp batch_nr resample_result #> 1: 0.064 2021-09-17 04:15:51 1 <ResampleResult[20]> #> 2: 0.066 2021-09-17 04:15:51 1 <ResampleResult[20]> #> 3: 0.066 2021-09-17 04:15:51 1 <ResampleResult[20]> #> 4: 0.076 2021-09-17 04:15:51 1 <ResampleResult[20]> #> 5: 0.067 2021-09-17 04:15:53 2 <ResampleResult[20]> #> 6: 0.073 2021-09-17 04:15:53 2 <ResampleResult[20]> #> 7: 0.066 2021-09-17 04:15:53 2 <ResampleResult[20]> #> 8: 0.069 2021-09-17 04:15:53 2 <ResampleResult[20]> #> 9: 0.067 2021-09-17 04:15:53 2 <ResampleResult[20]> #> 10: 0.078 2021-09-17 04:15:53 2 <ResampleResult[20]>