Learn R Programming

rtemis (version 0.79)

dataPrepare: rtemis-internals: dataPrepare

Description

Prepare data for rtemis modeling

Usage

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)

Arguments

x

Numeric vector or matrix / data frame of features i.e. independent variables

y

Numeric vector of outcome, i.e. dependent variable

x.test

Numeric vector or matrix / data frame of testing set features Columns must correspond to columns in x

y.test

Numeric vector of testing set outcome

x.valid

Matrix / Data frame: Validation set features

y.valid

Vector: Validation outcome

ipw

Logical: If TRUE, return class weights for inverse probability weighting (for Classification)

ipw.type

1, 2: 1:

upsample

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

upsample.seed

Integer: If provided, will be used to set the seed during upsampling. Default = NULL (random seed)

removeDots

Logical: If TRUE, replace dots in variable names with underscores. Some algorithms do not work with variable names containing dots (SparkML)

.preprocess

List: Preprocessing settings. Set with rtset.preprocess

verbose

Logical: If TRUE, print messages to console