rtemis-internals
: dataPrepare
Prepare data for rtemis modeling
dataPrepare(x, y = NULL, x.test = NULL, y.test = NULL,
x.valid = NULL, y.valid = NULL, ipw = TRUE, ipw.type = 2,
upsample = FALSE, upsample.seed = NULL, removeDots = FALSE,
.preprocess = NULL, verbose = FALSE)
Numeric vector or matrix / data frame of features i.e. independent variables
Numeric vector of outcome, i.e. dependent variable
Numeric vector or matrix / data frame of testing set features
Columns must correspond to columns in x
Numeric vector of testing set outcome
Matrix / Data frame: Validation set features
Vector: Validation outcome
Logical: If TRUE, return class weights for inverse probability weighting (for Classification)
1, 2: 1:
Logical: If TRUE, upsample cases to balance outcome classes (for Classification only) Caution: upsample will randomly sample with replacement if the length of the majority class is more than double the length of the class you are upsampling, thereby introducing randomness
Integer: If provided, will be used to set the seed during upsampling. Default = NULL (random seed)
Logical: If TRUE, replace dots in variable names with underscores. Some algorithms do not work with variable names containing dots (SparkML)
List: Preprocessing settings. Set with rtset.preprocess
Logical: If TRUE, print messages to console