Changes format of a k
-nearest-neighbour graph (k
-NNG) object produced by SingleBench
.
You will typically want to use this inside WrapTool
to change the format of a pre-computed k
-NNG object for use with a projection or clustering tool.
To only keep the Indices
slot of knn
(only keeping a single matrix instead of a list of two matrices), set parameter only_indices
to TRUE
.
To modify the Indices
slot of knn
to use zero-indexing, set parameter zero_index
to TRUE
.
To include the zero-th neighbour (self) for each point in knn
, set parameter zeroth_neighbour
to TRUE
.
If you want to limit the number of neighbours (to a value smaller than the original k
), specify the new value using parameter new_k
.
1 2 3 4 5 6 7 |
knn |
list: |
only_indices |
logical value: whether to only keep indices of nearest neighbours, discarding the distance matrix. Default value is |
zero_index |
logical value: whether to use zero indexing for nearest-neighbour indices. Default value is |
zeroth_neighbours |
logical value: whether to include the zero-th neighbour to each point (self). Default value is |
new_k |
optional integer value: new |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.