Description Usage Arguments Value Examples
scaler Perform standard scaler on numerical features.
1 |
x_train |
data.frame Dataframe of train set containing columns to be scaled. |
x_valid |
data.frame Dataframe of validation set containing columns to be scaled. |
x_test |
data.frame Dataframe of test set containing columns to be scaled. |
colnames |
vector Vector of column names for numeric features |
list of data.frame Stores the x_train, x_valid and x_test separately as three dataframes in one list. The first element in the list will contain x_train, second will be x_valid and the third will contain x_test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | x_train <- data.frame(colors = c('Blue', 'Red', 'Green'), counts = c(34, 35, 56),
usage = c(4, 6, 9))
x_valid <- data.frame(colors = c('Blue', 'Red', 'Green'), counts = c(29, 65, 13),
usage = c(5, 27, 10))
x_test <- data.frame(colors = c('Blue', 'Red', 'Green'), counts = c(20, 35, 18),
usage = c(9, 6, 0))
colnames <- c('counts', 'usage')
x_train = scaler(x_train, x_valid, x_test, colnames)$x_train
x_test = scaler(x_train, x_valid, x_test, colnames)$x_test
x_valid = scaler(x_train, x_valid, x_test, colnames)$x_valid
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.