View source: R/SharedNeighborDistance.R
SharedNeighborDistance | R Documentation |
Calculates the Shared Neighbor Distance
SharedNeighborDistance(Data, k = 5, NThreads = NULL, ComputationInR = FALSE)
Data |
[1:n,1:d] matrix with n cases, d variables |
k |
Integer defining the number of nearest neighbors |
NThreads |
Number of threads in parallel computation. |
ComputationInR |
Boolean (Default ComputationInR = FALSE). If FALSE, do computation in Rcpp, else in R (very slow). |
Distance |
[1:n,1:n] symmetric matrix, containing the distanes of the cases (rows) for the given data |
Quirin Stier
https://github.com/albert-espin/snn-clustering/blob/master/SNN/snn.py
data(Hepta)
distMatrix = SharedNeighborDistance(Hepta$Data, NThreads = 1, ComputationInR=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.