Wrapper around base::scale()
to make it compatible with the
processData()
framework. Additionally provides a MARGIN
param.
$$\LARGE z_{i,j} = \frac{x_{i,j} - \mu_i}{\sigma_i} $$
Where:
\(x_{i,j}\) is the original value for feature \(i\) in sample \(j\)
\(\mu_i\) is the mean of feature \(i\) across all samples
\(\sigma_i\) is the standard deviation of feature \(i\) across all samples
\(z_{i,j}\) is the resulting scaled value
scale | logical (default = TRUE ) Whether to scale values |
center | logical (default = TRUE ) Whether to center values |
MARGIN | numeric. Either 1 (rows) or 2 (cols). Direction along which to perform the operation. |
Other scaling parameters:
scale_default