View source: R/ExhaustiveParam.R
ExhaustiveParam | R Documentation |
A class to hold parameters for the exhaustive algorithm for exact nearest neighbor identification.
ExhaustiveParam(distance = c("Euclidean", "Manhattan", "Cosine"))
## S4 method for signature 'ExhaustiveParam'
defineBuilder(BNPARAM)
distance |
String specifying the distance metric to use. Cosine distances are implemented as Euclidean distances on L2-normalized coordinates. |
BNPARAM |
An ExhaustiveParam instance. |
The exhaustive search computes all pairwise distances between data and query points to identify nearest neighbors of the latter. It has quadratic complexity and is theoretically the worst-performing method; however, it has effectively no overhead from constructing or querying indexing structures, making it faster for in situations where indexing provides little benefit. This includes queries against datasets with few data points or very high dimensionality.
All that said, this algorithm is largely provided as a baseline for comparing against the other algorithms.
The ExhaustiveParam
constructor returns an instance of the ExhaustiveParam class.
The defineBuilder
method returns an external pointer that can be used in buildIndex
to construct an exhaustive index.
Allison Vuong
BiocNeighborParam, for the parent class and its available methods.
(out <- ExhaustiveParam())
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.