runNearestNeighborClustering | R Documentation |
A wrapper around the RANN::nn2()
function - nearest neighbor clustering.
runNearestNeighborClustering(
object,
n_pcs = NULL,
k = 50,
naming = "nn2_{priority}_{treetype}",
searchtype = "priority",
treetype = "bd",
radius = 0,
eps = 0,
overwrite = FALSE,
verbose = TRUE
)
object |
An object of class |
n_pcs |
Numeric value or |
k |
The maximum number of nearest neighbours to compute. The default value is set to the smaller of the number of columnns in data. |
naming |
Character value. A glue expression for the new cluster variable name. |
searchtype |
See details |
treetype |
Character vector. Character vector specifying the standard 'kd' tree or a 'bd' (box-decomposition, AMNSW98) tree which may perform better for larger point sets. |
radius |
Radius of search for searchtype='radius' |
eps |
Error bound: default of 0.0 implies exact nearest neighbour search |
overwrite |
Logical value. Must be |
verbose |
Logical. If (Warning messages will always be printed.) |
searchtypes |
Character value. Either 'priority', 'standard' or 'radius '. See details for more. |
Search types: priority visits cells in increasing order of distance from the query point, and hence, should converge more rapidly on the true nearest neighbour, but standard is usually faster for exact searches. radius only searches for neighbours within a specified radius of the point. If there are no neighbours then nn.idx will contain 0 and nn.dists will contain 1.340781e+154 for that point.
The updated input object, containing the added, removed or computed results.
Requires the RANN
packge.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.