Description Usage Arguments Value Examples

construct a umap.knn object describing nearest neighbors

1 | ```
umap.knn(indexes, distances)
``` |

`indexes` |
matrix, integers linking data points to nearest neighbors |

`distances` |
matrix, distance values between pairs of points specified in the matrix of indexes |

object of class umap.knn, which is a list with matrices with indexes of nearest neighbors and distances to those neighbors

1 2 3 4 5 6 7 8 9 10 11 | ```
# this example describes a set of three data points (indexes 1,2,3)
# which are equidistant from each other. Hence the distance between
# pairs (i, j) is 0 for i=j and 1 otherwise.
three.indexes = matrix(c(1,2,3,
2,1,3,
3,1,2), nrow=3, ncol=3)
three.distances = matrix(c(0, 1, 1,
0, 1, 1,
0, 1, 1), nrow=3, ncol=3)
umap.knn(three.indexes, three.distances)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.