
Standardization (Geron Ch 2, morie.fn grstd)
Source:R/geron_train_native.R
morie_geron_standardization_grstd.Rdz = (x - mean)/sd per column with ddof = 0 by default; a constant column raises.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_standardization_grstd(V)
#> $scaled
#> [1] -1.5275252 -1.0910895 -0.6546537 -0.2182179 0.2182179 0.6546537 1.0910895
#> [8] 1.5275252
#>
#> $mean
#> [1] 4.5
#>
#> $scale
#> [1] 2.291288
#>
#> $estimate
#> [1] -1.5275252 -1.0910895 -0.6546537 -0.2182179 0.2182179 0.6546537 1.0910895
#> [8] 1.5275252
#>
#> $n
#> [1] 8
#>