
Gaussian random projection (Geron Ch 8, morie.fn grgrp)
Source:R/geron_train_native.R
morie_geron_gaussian_random_projection.RdZ = X R with R_ij ~ N(0, 1/d) drawn from the reference LCG and
reshaped ROW-MAJOR into (n, d). achieved_variance is the ddof = 1
variance, matching the payload (not the ddof = 0 summary line).
Value
List with projected, R, target_variance,
achieved_variance, mean_distance_ratio, max_distance_ratio.
Examples
morie_geron_gaussian_random_projection(X = c(1, 2, 3, 4, 5, 6, 7, 8), d = 5L)
#> $projected
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 8.070968 -0.2746068 0.9530029 4.098278 -5.865283
#>
#> $R
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] -0.13566488 0.74769595 -0.13922765 -0.24540484 -0.44615930
#> [2,] -0.42860982 -0.41649364 -0.50368374 -0.45339372 -0.25596568
#> [3,] -0.02353098 -0.30057333 0.33163607 -0.29194708 -1.40790811
#> [4,] -0.13086211 -0.14052006 0.34428118 -0.38021065 -0.48812465
#> [5,] -0.49045795 -0.13154572 0.01075495 0.60505234 -0.12829530
#> [6,] 1.31871292 -0.06200600 -0.05278134 0.37585615 0.41880015
#> [7,] 0.64781232 0.09075158 -0.45056334 0.44021359 -0.04194005
#> [8,] -0.04209747 0.20862354 0.39305272 -0.08934243 -0.03858922
#>
#> $target_variance
#> [1] 0.2
#>
#> $achieved_variance
#> [1] 0.2103512
#>
#> $mean_distance_ratio
#> NULL
#>
#> $max_distance_ratio
#> NULL
#>
#> $d
#> [1] 5
#>
#> $seed
#> [1] 0
#>
#> $estimate
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 8.070968 -0.2746068 0.9530029 4.098278 -5.865283
#>
#> $n
#> [1] 1
#>