FeatSelControl].All algorithms operate on a 0-1-bit encoding of candidate solutions. Per default a single bit corresponds
to a single feature, but you are able to change this by using the arguments bit.names
and bits.to.features. Thus allowing you to switch on whole groups of features with a single bit.
selectFeatures(learner, task, resampling, measures, bit.names, bits.to.features, control, show.info = getMlrOption("show.info"))Learner | character(1)]
The learner.
If you pass a string the learner will be created via makeLearner.Task]
The task.ResampleInstance | ResampleDesc]
Resampling strategy for feature selection. If you pass a description,
it is instantiated once at the beginning by default, so all points are evaluated on the same training/test sets.
If you want to change that behaviour, look at FeatSelControl.Measure | Measure]
Performance measures to evaluate. The first measure, aggregated by the first aggregation function
is optimized, others are simply evaluated.
Default is the default measure for the task, see here getDefaultMeasure.FeatSelControl]
Control object for search method.
Also selects the optimization algorithm for feature selection.logical(1)]
Print verbose output on console?
Default is set via configureMlr.FeatSelControl,
analyzeFeatSelResult,
getFeatSelResult,
makeFeatSelWrapper
rdesc = makeResampleDesc("Holdout")
ctrl = makeFeatSelControlSequential(method = "sfs", maxit = NA)
res = selectFeatures("classif.rpart", iris.task, rdesc, control = ctrl)
analyzeFeatSelResult(res)
Run the code above in your browser using DataLab