scaling: Apply scaling to numeric columns in test and train sets.

Description Usage Arguments Value

View source: R/keras_prepare_functions.r

Description

To promote the convergence in neural net trainings, it is of advantage to have the input variable values in a similar range. This can be achieved by scaling the numeric values. The mean is subtracted from all values and then all values are divided by the standard deviation (SD). This yields values centered around 0 with an SD of 1. Mean and SD are calculated ONLY based on training data ( e.g. https://stackoverflow.com/a/49444783). Dummy columns and a non-dummy response variable, as in regression use cases, are excluded from scaling.

Usage

1
scaling(input_tables)

Arguments

input_tables

a list of splitted input tables. The "train_set" and "test_set" tables need to be located at e.g 'input_tables[[1]][["train_set"]]' and 'input_tables[[1]][["test_set"]]', respectively

Value

A list of same structure as the input list, with scaled numeric columns


RJ333/phyloseq2ML documentation built on June 2, 2020, 9:25 p.m.