powered by
Rescale all columns of a matrix
clamp(.data)clamp_robust(.data)clamp_sd(.data, sd = 1)clamp_standardize(.data, sd = 1)
clamp_robust(.data)
clamp_sd(.data, sd = 1)
clamp_standardize(.data, sd = 1)
A numeric matrix
the value of each columns standard deviation (default is 1)
A matrix with the same dimension as .data where each column has been rescaled.
.data
These functions are used internally by the tour to rescale all columns of .data.
clamp() rescales so all values for each column lie in the unit interval
clamp()
clamp_robust() rescales by first centering by the median and then scaling by the median absolute deviation.
clamp_robust()
clamp_sd() rescales all columns to have a fixed standard deviation.
clamp_sd()
clamp_standardize() rescales all columns to have zero mean and unit variance.
clamp_standardize()
# NOT RUN { mv <- matrix(rnorm(30), ncol = 3) clamp(mv) clamp_robust(mv) clamp_sd(mv) clamp_standardize(mv) # }
Run the code above in your browser using DataLab