This function arranges the data in the required format and displays error messages.
preProcess(
data,
x,
y,
numStop = 5,
fold = 5,
max.depth = NULL,
max.leaves = NULL,
na.rm = TRUE
)
It returns a data.frame
in the required format.
data.frame
or matrix
containing the variables in the model.
Column input indexes in data.
Column output indexes in data.
Minimum number of observations in a node for a split to be attempted.
Set of number of folds in which the dataset to apply cross-validation during the pruning is divided.
Depth of the tree.
Maximum number of leaf nodes.
logical
. If TRUE
, NA
rows are omitted.