Description Usage Arguments Value See Also Examples
View source: R/FeatSelWrapper.R
Fuses a base learner with a search strategy to select variables.
Creates a learner object, which can be used like any other learner object,
but which internally uses selectFeatures
.
If the train function is called on it,
the search strategy and resampling are invoked to select an optimal set of variables.
Finally, a model is fitted on the complete training data with these variables and returned.
See selectFeatures
for more details.
After training, the optimal features (and other related information) can be retrieved with
getFeatSelResult
.
1 2 | makeFeatSelWrapper(learner, resampling, measures, bit.names, bits.to.features,
control, show.info = getMlrOption("show.info"))
|
learner |
[ |
resampling |
[ |
measures |
[list of |
bit.names |
[character] |
bits.to.features |
[function(x, task)] |
control |
[see |
show.info |
[ |
[Learner
].
Other featsel: FeatSelControl
,
analyzeFeatSelResult
,
getFeatSelResult
,
selectFeatures
Other wrapper: makeBaggingWrapper
,
makeClassificationViaRegressionWrapper
,
makeConstantClassWrapper
,
makeCostSensClassifWrapper
,
makeCostSensRegrWrapper
,
makeDownsampleWrapper
,
makeDummyFeaturesWrapper
,
makeExtractFDAFeatsWrapper
,
makeFilterWrapper
,
makeImputeWrapper
,
makeMulticlassWrapper
,
makeMultilabelBinaryRelevanceWrapper
,
makeMultilabelClassifierChainsWrapper
,
makeMultilabelDBRWrapper
,
makeMultilabelNestedStackingWrapper
,
makeMultilabelStackingWrapper
,
makeOverBaggingWrapper
,
makePreprocWrapperCaret
,
makePreprocWrapper
,
makeRemoveConstantFeaturesWrapper
,
makeSMOTEWrapper
,
makeTuneWrapper
,
makeUndersampleWrapper
,
makeWeightedClassesWrapper
1 2 3 4 5 6 7 | # nested resampling with feature selection (with a pretty stupid algorithm for selection)
outer = makeResampleDesc("CV", iters = 2L)
inner = makeResampleDesc("Holdout")
ctrl = makeFeatSelControlRandom(maxit = 1)
lrn = makeFeatSelWrapper("classif.ksvm", resampling = inner, control = ctrl)
# we also extract the selected features for all iteration here
r = resample(lrn, iris.task, outer, extract = getFeatSelResult)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.