prep.autoscale function

Autoscale values

Autoscale values

Autoscale (mean center and standardize) values in columns of data matrix.

The use of max.cov allows to avoid overestimation of inert variables, which vary very little. Note, that the max.cov value is already in percent, e.g. if max.cov = 0.1 it will compare the coefficient of variation of every variable with 0.1

want to use this option simply keep max.cov = 0.

prep.autoscale(data, center = TRUE, scale = FALSE, max.cov = 0)

Arguments

  • data: a matrix with data values
  • center: a logical value or vector with numbers for centering
  • scale: a logical value or vector with numbers for weighting
  • max.cov: columns that have coefficient of variation (in percent) below or equal to max.cov will not be scaled

Returns

data matrix with processed values

  • Maintainer: Sergey Kucheryavskiy
  • License: MIT + file LICENSE
  • Last published: 2024-08-19