setup.preprocess | R Documentation |
.preprocess
argumentSet preprocess parameters for train_cv .preprocess
argument
setup.preprocess(
completeCases = FALSE,
removeCases.thres = NULL,
removeFeatures.thres = NULL,
impute = FALSE,
impute.type = "missRanger",
impute.missRanger.params = list(pmm.k = 0, maxiter = 10),
impute.discrete = get_mode,
impute.numeric = mean,
integer2factor = FALSE,
integer2numeric = FALSE,
logical2factor = FALSE,
logical2numeric = FALSE,
numeric2factor = FALSE,
numeric2factor.levels = NULL,
numeric.cut.n = 0,
numeric.cut.labels = FALSE,
numeric.quant.n = 0,
character2factor = FALSE,
scale = FALSE,
center = FALSE,
removeConstants = TRUE,
oneHot = FALSE,
exclude = NULL
)
completeCases |
Logical: If TRUE, only retain complete cases (no missing data). Default = FALSE |
removeCases.thres |
Float (0, 1): Remove cases with >= to this fraction of missing features. |
removeFeatures.thres |
Float (0, 1): Remove features with missing values in >= to this fraction of cases. |
impute |
Logical: If TRUE, impute missing cases. See |
impute.type |
Character: How to impute data: "missRanger" and
"missForest" use the packages of the same name to impute by iterative random
forest regression. "rfImpute" uses |
impute.missRanger.params |
Named list with elements "pmm.k" and
"maxiter", which are passed to |
impute.discrete |
Function that returns single value: How to impute
discrete variables for |
impute.numeric |
Function that returns single value: How to impute
continuous variables for |
integer2factor |
Logical: If TRUE, convert all integers to factors. This includes
|
integer2numeric |
Logical: If TRUE, convert all integers to numeric
(will only work if |
logical2factor |
Logical: If TRUE, convert all logical variables to factors |
logical2numeric |
Logical: If TRUE, convert all logical variables to numeric |
numeric2factor |
Logical: If TRUE, convert all numeric variables to factors |
numeric2factor.levels |
Character vector: Optional - will be passed to
|
numeric.cut.n |
Integer: If > 0, convert all numeric variables to factors by
binning using |
numeric.cut.labels |
Logical: The |
numeric.quant.n |
Integer: If > 0, convert all numeric variables to factors by
binning using |
character2factor |
Logical: If TRUE, convert all character variables to factors |
scale |
Logical: If TRUE, scale columns of |
center |
Logical: If TRUE, center columns of |
removeConstants |
Logical: If TRUE, remove constant columns. |
oneHot |
Logical: If TRUE, convert all factors using one-hot encoding |
exclude |
Integer, vector: Exclude these columns from preprocessing. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.