Skip to contents

Isomap: geodesic MDS via kNN graph + Dijkstra (Geron Ch 7, morie.fn hmiso)

Usage

morie_geron_isomap(X, n_components, n_neighbors = 5)

Arguments

X

Data.

n_components

Embedding dim.

n_neighbors

Neighbours.

Value

List with embedding, geodesic_distances, eigenvalues, stress, n_neighbors, estimate, n, method.

Examples

morie_geron_isomap(X = c(1, 2, 3, 4, 5, 6, 7, 8), n_components = 5L)
#> $embedding
#>      [,1] [,2] [,3] [,4] [,5]
#> [1,]  3.5    0    0    0    0
#> [2,]  2.5    0    0    0    0
#> [3,]  1.5    0    0    0    0
#> [4,]  0.5    0    0    0    0
#> [5,] -0.5    0    0    0    0
#> [6,] -1.5    0    0    0    0
#> [7,] -2.5    0    0    0    0
#> [8,] -3.5    0    0    0    0
#> 
#> $geodesic_distances
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,]    0    1    2    3    4    5    6    7
#> [2,]    1    0    1    2    3    4    5    6
#> [3,]    2    1    0    1    2    3    4    5
#> [4,]    3    2    1    0    1    2    3    4
#> [5,]    4    3    2    1    0    1    2    3
#> [6,]    5    4    3    2    1    0    1    2
#> [7,]    6    5    4    3    2    1    0    1
#> [8,]    7    6    5    4    3    2    1    0
#> 
#> $euclidean_distances
#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
#> [1,]    0    1    2    3    4    5    6    7
#> [2,]    1    0    1    2    3    4    5    6
#> [3,]    2    1    0    1    2    3    4    5
#> [4,]    3    2    1    0    1    2    3    4
#> [5,]    4    3    2    1    0    1    2    3
#> [6,]    5    4    3    2    1    0    1    2
#> [7,]    6    5    4    3    2    1    0    1
#> [8,]    7    6    5    4    3    2    1    0
#> 
#> $eigenvalues
#> [1]  4.200000e+01  2.131628e-14  1.868751e-15  7.806126e-17  2.751883e-17
#> [6]  1.115696e-17  1.096045e-17 -2.785495e-33
#> 
#> $stress
#> [1] 5.534352e-30
#> 
#> $geodesic_ratio
#> [1] 1
#> 
#> $n_neighbors
#> [1] 5
#> 
#> $estimate
#> [1] 5.534352e-30
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "Isomap (geodesic distances + classical MDS)"
#>