View source: R/nearestNeighbors.R
uniqueNeighbors | R Documentation |
Find pairs of unique nearest neighbors pairs from possible redundant pairs. Used as options (neighbor.sampling="unique") in nearestNeighbors and npdr functions.
uniqueNeighbors(neighbor.pairs)
neighbor.pairs |
two columns of (possibly redundant) "i,j" pairs from nearestNeighbors function |
two columns of unique pairs from the possibly redundant input, i.e., new neighborhood pair matrix of only unique neighbor pairs
neighbor.pairs.idx <- nearestNeighbors(
predictors.mat,
nbd.method = "multisurf",
nbd.metric = "manhattan",
sd.frac = 0.5
)
head(uniqueNeighbors(neighbor.pairs.idx))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.