Description Usage Arguments Value See Also Examples
View source: R/selectFeatures.R
Optimizes the features for a classification or regression problem by choosing a variable selection wrapper approach.
Allows for different optimization methods, such as forward search or a genetic algorithm.
You can select such an algorithm (and its settings)
by passing a corresponding control object. For a complete list of implemented algorithms look at the
subclasses of [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.
1 2 | selectFeatures(learner, task, resampling, measures, bit.names, bits.to.features,
control, show.info = getMlrOption("show.info"))
|
learner |
[ |
task |
[ |
resampling |
[ |
measures |
[list of |
bit.names |
[character] |
bits.to.features |
[function(x, task)] |
control |
[see |
show.info |
[ |
[FeatSelResult
].
Other featsel: FeatSelControl
,
analyzeFeatSelResult
,
getFeatSelResult
,
makeFeatSelWrapper
1 2 3 4 | rdesc = makeResampleDesc("Holdout")
ctrl = makeFeatSelControlSequential(method = "sfs", maxit = NA)
res = selectFeatures("classif.rpart", iris.task, rdesc, control = ctrl)
analyzeFeatSelResult(res)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.