preprocess_scale: Preprocess data by scaling it.

Description Usage Arguments Value See Also

View source: R/preprocess.R

Description

This function takes either a data.frame or a list of data.frames. In the event of the first, this function takes the dataset and will scale each column that is not categorical such that that column has zero mean and unit variance. In the event of the second, this function takes the training dataset and will identify the parameters needed to scale the training dataset such that each column that is not categorical has zero mean and unit variance, and then will apply those parameters to each column in the testing dataset that is not categorical.

Usage

1
preprocess_scale(.data, categorical_variables = NULL)

Arguments

.data

A data.frame; the data to be analyzed.

categorical_variables

A logical vector; each value TRUE indicates that column in the data.frame is a categorical variable. Defaults to NULL.

Value

A list, containing one or two data.frames.

See Also

Other preprocess: preprocess_identity


easyml documentation built on June 26, 2017, 9:02 a.m.