
Locally linear embedding (Geron Ch 7, morie.fn hmlle)
Source:R/geron_w4b_native.R
morie_geron_locally_linear_embedding.RdLocally linear embedding (Geron Ch 7, morie.fn hmlle)
Examples
morie_geron_locally_linear_embedding(X = c(1, 2, 3, 4, 5, 6, 7, 8), n_components = 5L)
#> $embedding
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 0.53993623 0.4039597 0.022915603 0.06387625 0.15654667
#> [2,] 0.38583092 0.2720550 0.002592873 0.16266953 -0.50029457
#> [3,] 0.23160711 -0.2064013 -0.090000176 -0.69555884 0.35877099
#> [4,] 0.07721016 -0.4881556 0.462932157 0.54042085 0.31966251
#> [5,] -0.07721235 -0.4108408 -0.756072369 0.20815933 -0.21311141
#> [6,] -0.23160038 -0.2584258 0.419396575 -0.37985605 -0.48900107
#> [7,] -0.38583711 0.2739379 -0.148388901 0.02832934 0.45041361
#> [8,] -0.53993458 0.4138710 0.086624238 0.07195959 -0.08298673
#>
#> $weights
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 0.0000000 0.7993407 0.49967036 0.20000000 -0.09967036 -0.39934073
#> [2,] 0.5403979 0.0000000 0.29725655 0.17568586 0.05411517 -0.06745553
#> [3,] 0.2906776 0.2558016 0.00000000 0.18604959 0.15117358 0.11629756
#> [4,] 0.1162976 0.1511736 0.18604959 0.00000000 0.25580163 0.29067764
#> [5,] 0.0000000 0.1162976 0.15117358 0.18604959 0.00000000 0.25580163
#> [6,] 0.0000000 0.0000000 0.11629756 0.15117358 0.18604959 0.00000000
#> [7,] 0.0000000 0.0000000 -0.06745553 0.05411517 0.17568586 0.29725655
#> [8,] 0.0000000 0.0000000 -0.39934073 -0.09967036 0.20000000 0.49967036
#> [,7] [,8]
#> [1,] 0.0000000 0.0000000
#> [2,] 0.0000000 0.0000000
#> [3,] 0.0000000 0.0000000
#> [4,] 0.0000000 0.0000000
#> [5,] 0.2906776 0.0000000
#> [6,] 0.2558016 0.2906776
#> [7,] 0.0000000 0.5403979
#> [8,] 0.7993407 0.0000000
#>
#> $reconstruction_error
#> [1] 1.086608e-05 5.681214e-07 1.756390e-08 1.756390e-08 1.756390e-08
#> [6] 1.756390e-08 5.681214e-07 1.086608e-05
#>
#> $eigenvalues
#> [1] -1.157162e-16 2.275598e-07 5.810646e-01 1.451937e+00 1.518721e+00
#> [6] 2.022098e+00
#>
#> $M
#> [,1] [,2] [,3] [,4] [,5] [,6]
#> [1,] 1.3900485 -1.24780174 -0.6080741 -0.16727683 0.20260597 0.4304981
#> [2,] -1.2478017 1.74075864 -0.1079444 -0.09776239 -0.17274242 -0.1483128
#> [3,] -0.6080741 -0.10794441 1.5730482 -0.13808237 -0.35855362 -0.5790249
#> [4,] -0.1672768 -0.09776239 -0.1380824 1.17581051 -0.40645326 -0.4980577
#> [5,] 0.2026060 -0.17274242 -0.3585536 -0.40645326 1.20663053 -0.1616044
#> [6,] 0.4304981 -0.14831279 -0.5790249 -0.49805768 -0.16160437 1.6655083
#> [7,] 0.0000000 0.03380510 -0.1780619 -0.04103484 -0.25890357 -0.0792955
#> [8,] 0.0000000 0.00000000 0.3966930 0.17285687 -0.05097927 -0.6297112
#> [,7] [,8]
#> [1,] 0.00000000 0.00000000
#> [2,] 0.03380510 0.00000000
#> [3,] -0.17806190 0.39669300
#> [4,] -0.04103484 0.17285687
#> [5,] -0.25890357 -0.05097927
#> [6,] -0.07929550 -0.62971117
#> [7,] 1.78887356 -1.26538285
#> [8,] -1.26538285 1.37652343
#>
#> $n_neighbors
#> [1] 5
#>
#> $estimate
#> [1] 2.293866e-05
#>
#> $n
#> [1] 8
#>
#> $method
#> [1] "Locally linear embedding"
#>