% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImputeWrapper.R
\name{makeImputeWrapper}
\alias{makeImputeWrapper}
\title{Fuse learner with an imputation method.}
\usage{
makeImputeWrapper(learner, classes = list(), cols = list(),
  dummy.classes = character(0L), dummy.cols = character(0L),
  dummy.type = "factor", force.dummies = FALSE, impute.new.levels = TRUE,
  recode.factor.levels = TRUE)
}
\arguments{
\item{learner}{[\code{\link{Learner}} | \code{character(1)}]\cr
The learner.
If you pass a string the learner will be created via \code{\link{makeLearner}}.}

\item{classes}{[\code{named list}]\cr
Named list containing imputation techniques for classes of columns.
E.g. \code{list(numeric = imputeMedian())}.}

\item{cols}{[\code{named list}]\cr
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 via
\code{classes}.}

\item{dummy.classes}{[\code{character}]\cr
Classes of columns to create dummy columns for.
Default is \code{character(0)}.}

\item{dummy.cols}{[\code{character}]\cr
Column names to create dummy columns (containing binary missing indicator) for.
Default is \code{character(0)}.}

\item{dummy.type}{[\code{character(1)}]\cr
How dummy columns are encoded. Either as 0/1 with type \dQuote{numeric}
or as \dQuote{factor}.
Default is \dQuote{factor}.}

\item{force.dummies}{[\code{logical(1)}]\cr
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 is \code{FALSE}.}

\item{impute.new.levels}{[\code{logical(1)}]\cr
If new, unencountered factor level occur during reimputation,
should these be handled as NAs and then be imputed the same way?
Default is \code{TRUE}.}

\item{recode.factor.levels}{[\code{logical(1)}]\cr
Recode factor levels after reimputation, so they match the respective element of
\code{lvls} (in the description object) and therefore match the levels of the
feature factor in the training data after imputation?.
Default is \code{TRUE}.}
}
\value{
[\code{\link{Learner}}].
}
\description{
Fuses a base learner with an imputation method. Creates a learner object, which can be
used like any other learner object.
Internally uses \code{\link{impute}} before training the learner and \code{\link{reimpute}}
before predicting.
}
\seealso{
Other impute: \code{\link{imputations}},
  \code{\link{impute}}, \code{\link{makeImputeMethod}},
  \code{\link{reimpute}}

Other wrapper: \code{\link{makeBaggingWrapper}},
  \code{\link{makeConstantClassWrapper}},
  \code{\link{makeCostSensClassifWrapper}},
  \code{\link{makeCostSensRegrWrapper}},
  \code{\link{makeDownsampleWrapper}},
  \code{\link{makeFeatSelWrapper}},
  \code{\link{makeFilterWrapper}},
  \code{\link{makeMulticlassWrapper}},
  \code{\link{makeMultilabelBinaryRelevanceWrapper}},
  \code{\link{makeMultilabelClassifierChainsWrapper}},
  \code{\link{makeMultilabelDBRWrapper}},
  \code{\link{makeMultilabelNestedStackingWrapper}},
  \code{\link{makeMultilabelStackingWrapper}},
  \code{\link{makeOverBaggingWrapper}},
  \code{\link{makePreprocWrapperCaret}},
  \code{\link{makePreprocWrapper}},
  \code{\link{makeRemoveConstantFeaturesWrapper}},
  \code{\link{makeSMOTEWrapper}},
  \code{\link{makeTuneWrapper}},
  \code{\link{makeUndersampleWrapper}},
  \code{\link{makeWeightedClassesWrapper}}
}
