Hi Rose,
The kd-tree performs the kNN search without classification. It is a data structure that, once created over your data, allow you to query a point for its neighbors, either using a fixed number of neighbors on considering a given distance radius.
I am sending the kd-tree attached. It is not finished yet (lacks some documentation, polishing, etc) but it works.
To use it, create a KDTree from your data by calling
var tree = KDTree.FromData;
after that, you may query neighbors in the tree using
tree.Nearest(yourpoint, distanceRadius)
or
tree.Nearest(yourpoint, numberOfNeighbors)
Please see if it helps!
Best regards,
Cesar