Fuses a base learner with an imputation method. Creates a learner object, which can be used like any other learner object. Internally uses impute before training the learner and reimpute before predicting.
Arguments
- learner
(Learner |
character(1)
)
The learner. If you pass a string the learner will be created via makeLearner.- classes
(named list)
Named list containing imputation techniques for classes of columns. E.g.list(numeric = imputeMedian())
.- cols
(named list)
Named list containing names of imputation methods to impute missing values in the data column referenced by the list element's name. Overrules imputation set viaclasses
.- dummy.classes
(character)
Classes of columns to create dummy columns for. Default ischaracter(0)
.- dummy.cols
(character)
Column names to create dummy columns (containing binary missing indicator) for. Default ischaracter(0)
.- dummy.type
(
character(1)
)
How dummy columns are encoded. Either as 0/1 with type “numeric” or as “factor”. Default is “factor”.- force.dummies
(
logical(1)
)
Force dummy creation even if the respective data column does not contain any NAs. Note that (a) most learners will complain about constant columns created this way but (b) your feature set might be stochastic if you turn this off. Default isFALSE
.- impute.new.levels
(
logical(1)
)
If new, unencountered factor level occur during reimputation, should these be handled as NAs and then be imputed the same way? Default isTRUE
.- recode.factor.levels
(
logical(1)
)
Recode factor levels after reimputation, so they match the respective element oflvls
(in the description object) and therefore match the levels of the feature factor in the training data after imputation?. Default isTRUE
.
See also
Other impute:
imputations
,
impute()
,
makeImputeMethod()
,
reimpute()
Other wrapper:
makeBaggingWrapper()
,
makeClassificationViaRegressionWrapper()
,
makeConstantClassWrapper()
,
makeCostSensClassifWrapper()
,
makeCostSensRegrWrapper()
,
makeDownsampleWrapper()
,
makeDummyFeaturesWrapper()
,
makeExtractFDAFeatsWrapper()
,
makeFeatSelWrapper()
,
makeFilterWrapper()
,
makeMulticlassWrapper()
,
makeMultilabelBinaryRelevanceWrapper()
,
makeMultilabelClassifierChainsWrapper()
,
makeMultilabelDBRWrapper()
,
makeMultilabelNestedStackingWrapper()
,
makeMultilabelStackingWrapper()
,
makeOverBaggingWrapper()
,
makePreprocWrapperCaret()
,
makePreprocWrapper()
,
makeRemoveConstantFeaturesWrapper()
,
makeSMOTEWrapper()
,
makeTuneWrapper()
,
makeUndersampleWrapper()
,
makeWeightedClassesWrapper()