
Sparse random projection matrix with {-1,0,+1} entries
Source: R/geron_w4d_native.R
morie_geron_sparse_rand_projection.RdR_ij = +-sqrt(s/d_out) with prob 1/(2s) each (s = 1/density), else 0. Measures realised pairwise-distance distortion.
Value
list with X_proj, R, density, s, scale, nnz, max_distortion, mean_distortion, estimate, n, method.
Examples
morie_geron_sparse_rand_projection(X = c(1, 2, 3, 4, 5, 6, 7, 8), d_out = 5L)
#> $X_proj
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.4472136 0.4472136 -0.4472136 -0.4472136 0.4472136
#> [2,] 0.8944272 0.8944272 -0.8944272 -0.8944272 0.8944272
#> [3,] 1.3416408 1.3416408 -1.3416408 -1.3416408 1.3416408
#> [4,] 1.7888544 1.7888544 -1.7888544 -1.7888544 1.7888544
#> [5,] 2.2360680 2.2360680 -2.2360680 -2.2360680 2.2360680
#> [6,] 2.6832816 2.6832816 -2.6832816 -2.6832816 2.6832816
#> [7,] 3.1304952 3.1304952 -3.1304952 -3.1304952 3.1304952
#> [8,] 3.5777088 3.5777088 -3.5777088 -3.5777088 3.5777088
#>
#> $R
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.4472136 0.4472136 -0.4472136 -0.4472136 0.4472136
#>
#> $density
#> [1] 1
#>
#> $s
#> [1] 1
#>
#> $scale
#> [1] 0.4472136
#>
#> $nnz
#> [1] 5
#>
#> $max_distortion
#> [1] 2.220446e-16
#>
#> $mean_distortion
#> [1] 8.326673e-17
#>
#> $estimate
#> [1] 2.220446e-16
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Achlioptas/Li sparse random projection with +/-sqrt(s/d_out) entries"
#>