search for: knearest

Displaying 1 result from an estimated 1 matches for "knearest".

Did you mean: nearest
2004 Apr 06
1
k nearest neighbours
...C[which(apply(C,2,rank)>k)]<-NA; My problem is that the code is quite slow and due to the need to create a n*m matrix I run out of memory many times. I would also prefer to get a C matrix that is n*k instead of n*m were each of the values in C indicated the row in B were the corresponding knearest point would be. But I can not find a way to solve my main problem which is the need to create a n*m matrix. Thanks for any clues, Angel