FSelectorDesignPoints class that implements feature selection w.r.t. fixed
feature sets. We simply search over a set of feature subsets fully specified
by the user. The feature sets are evaluated in order as given.
In order to support general termination criteria and parallelization, we
evaluate feature sets in a batch-fashion of size
batches mean we can parallelize more, smaller batches imply a more
fine-grained checking of termination criteria.
This FSelector can be instantiated via the dictionary
mlr_fselectors or with the associated sugar function
Maximum number of configurations to try in a batch.
Design points to try in search, one per row.
Creates a new instance of this R6 class.
The objects of this class are cloneable with this method.
FSelectorDesignPoints$clone(deep = FALSE)
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
library(mlr3) library(data.table) terminator = trm("evals", n_evals = 10) instance = FSelectInstanceSingleCrit$new( task = tsk("iris"), learner = lrn("classif.rpart"), resampling = rsmp("holdout"), measure = msr("classif.ce"), terminator = terminator ) design = data.table(Petal.Length = c(TRUE, FALSE), Petal.Width = c(TRUE, FALSE), Sepal.Length = c(FALSE, TRUE), Sepal.Width = c(FALSE, TRUE)) fselector = fs("design_points", design = design) # Modifies the instance by reference fselector$optimize(instance) # Returns best scoring evaluation instance$result # Allows access of data.table of full path of all evaluations as.data.table(instance$archive)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.