BiocNeighborParam | R Documentation |
A virtual class for specifying the type of nearest-neighbor search algorithm and associated parameters.
The BiocNeighborParam class is a virtual base class on which other parameter objects are built. There are currently 5 concrete subclasses in BiocNeighbors:
KmknnParam
:Exact nearest-neighbor search with the KMKNN algorithm.
VptreeParam
:Exact nearest-neighbor search with the tree algorithm.
ExhaustiveParam
:Exact nearest-neighbor search via brute-force.
AnnoyParam
:Approximate nearest-neighbor search with the Annoy algorithm.
HnswParam
:Approximate nearest-neighbor search with the HNSW algorithm.
These objects hold parameters specifying how each algorithm should be run on an arbitrary data set. See the associated documentation pages for more details.
In the following code snippets, x
and object
are BiocNeighborParam objects.
show(object)
:Display the class and arguments of object
.
bndistance(object)
:Return a string specifying the distance metric to be used for searching.
This should be one of "Euclidean"
, "Manhattan"
or "Cosine"
.
x[[i]]
:Return the value of slot i
, as used in the constructor for x
.
x[[i]] <- value
:Set slot i
to the specified value
.
Aaron Lun
KmknnParam
,
VptreeParam
,
AnnoyParam
,
and HnswParam
for constructors.
buildIndex
, findKNN
and queryKNN
for dispatch.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.