Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

FSelectorGeneticSearch

Feature Selection via Genetic Search


Description

FSelectorGeneticSearch class that implements an Genetic Search. Calls genalg::rbga.bin() from package genalg.

Dictionary

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

mlr_fselectors$get("genetic_search")
fs("genetic_search")

Parameters

suggestions

list()

popSize

integer(1)

mutationChance

numeric(1)

elitism

integer(1)

zeroToOneRatio

integer(1)

iters

integer(1)

For the meaning of the control parameters, see genalg::rbga.bin(). genalg::rbga.bin() internally terminates after iters iteration. We set ìters = 100000 to allow the termination via our terminators. If more iterations are needed, set ìters to a higher value in the parameter set.

Super class

mlr3fselect::FSelector -> FSelectorGeneticSearch

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
FSelectorGeneticSearch$new()

Method clone()

The objects of this class are cloneable with this method.

Usage
FSelectorGeneticSearch$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("genetic_search", popSize = 10L)

# 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)

mlr3fselect

Feature Selection for 'mlr3'

v0.5.1
LGPL-3
Authors
Marc Becker [aut, cre] (<https://orcid.org/0000-0002-8115-0400>), Patrick Schratz [aut] (<https://orcid.org/0000-0003-0748-6624>), Michel Lang [aut] (<https://orcid.org/0000-0001-9754-0393>), Bernd Bischl [aut] (<https://orcid.org/0000-0001-6002-6980>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.