| buildIndex {BiocNeighbors} | R Documentation |
Build indices for nearest-neighbor searching with different algorithms.
buildIndex(X, ..., BNPARAM)
X |
A numeric matrix where rows correspond to data points and columns correspond to variables (i.e., dimensions). |
... |
Further arguments to be passed to individual methods.
This is guaranteed to include |
BNPARAM |
A BiocNeighborParam object specifying the type of index to be constructed. This defaults to a KmknnParam object if no argument is supplied. |
Supplying a KmknnParam object as BNPARAM will dispatch to buildKmknn.
Supplying a VptreeParam object as BNPARAM will dispatch to buildVptree.
Supplying an AnnoyParam object as BNPARAM will dispatch to buildAnnoy.
Supplying an HnswParam object as BNPARAM will dispatch to buildHnsw.
A BiocNeighborIndex object containing indexing structures for the specified algorithm.
Aaron Lun
buildKmknn,
buildVptree,
buildAnnoy
and buildHnsw for specific methods.
Y <- matrix(rnorm(100000), ncol=20) (k.out <- buildIndex(Y)) (a.out <- buildIndex(Y, BNPARAM=AnnoyParam()))