View source: R/KmknnIndex-class.R
KmknnIndex | R Documentation |
A class to hold indexing structures for the KMKNN algorithm for exact nearest neighbor identification.
KmknnIndex(data, centers, info, order, NAMES = NULL, distance = "Euclidean")
data |
A numeric matrix where columns correspond to data points and rows correspond to dimensions. |
centers |
A numeric matrix containing coordinates for cluster centroids, with clusters in columns and dimensions in rows. |
info |
A list containing additional information for each cluster, see |
order |
An integer vector of length equal to |
NAMES |
A character vector of sample names or |
distance |
A string specifying the distance metric to use. |
The KmknnIndex class holds the indexing structure required to run the KMKNN algorithm.
Users should never need to call the constructor explicitly, but should generate instances of KmknnIndex classes with buildKmknn
.
Users can get values from an HnswIndex object with the usual [[
syntax.
All parameters listed in the constructor can be extracted in this manner.
An instance of the KmknnIndex class.
Aaron Lun
buildKmknn
, to build the index.
BiocNeighborIndex, for the parent class and its available methods.
example(buildKmknn)
out[['centers']]
out[['info']]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.