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.06
# 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.06
# 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.06 #> 2: FALSE TRUE FALSE FALSE 0.06 #> 3: FALSE FALSE TRUE FALSE 0.26 #> 4: FALSE FALSE FALSE TRUE 0.48 #> 5: TRUE TRUE FALSE FALSE 0.06 #> 6: TRUE FALSE TRUE FALSE 0.06 #> 7: TRUE FALSE FALSE TRUE 0.06 #> 8: FALSE TRUE TRUE FALSE 0.06 #> 9: FALSE TRUE FALSE TRUE 0.06 #> 10: FALSE FALSE TRUE TRUE 0.26 #> uhash timestamp batch_nr #> 1: 6cd9bdbe-eb2a-427e-bec8-a4c79684ddea 2021-03-21 04:30:34 1 #> 2: a06b7202-a986-4023-9d15-e898227682d8 2021-03-21 04:30:34 1 #> 3: a789ead7-449a-4291-8da8-af14ed2b347a 2021-03-21 04:30:34 1 #> 4: e521e835-756c-4b36-b32a-d1642d19da1e 2021-03-21 04:30:34 1 #> 5: 0e3ac461-a992-448d-a969-4d3f199c76f1 2021-03-21 04:30:35 2 #> 6: b76be360-9bd4-4839-9b3d-c375617b3d21 2021-03-21 04:30:35 2 #> 7: f24dacd2-a3ba-408f-ac59-f6b48e1fa283 2021-03-21 04:30:35 2 #> 8: 423afbab-17f9-435e-adcd-0ab3c2a79f6c 2021-03-21 04:30:35 2 #> 9: ce04f1c6-f053-4e90-84f1-ee0574614529 2021-03-21 04:30:35 2 #> 10: 5eea0593-12d7-4bcb-abd1-163eceda51f3 2021-03-21 04:30:35 2