powered by
search.neighbour give the id of the Kth nearest neighbour
search.neighbour(vdist, k)
id of the Kth nearest neighbour
distance vector of point with other points
number of neighbours
computeGaussianSimilarityZP
vdist=c(0,2,1,5,7,1,3) id<-search.neighbour(vdist,2)
Run the code above in your browser using DataLab