searching for k nearest points
问题 I have a large set of features that looks like this: id1 28273 20866 29961 27190 31790 19714 8643 14482 5384 .... upto 1000 id2 12343 45634 29961 27130 33790 14714 7633 15483 4484 .... id3 ..... ..... ..... ..... ..... ..... .... ..... .... .... . . . ... id200000 .... .... ... .. . . . . I want to compute for each id euclidean distance and sort them to find the 5-nearest points. Because my dataset is very large. what is the best way to do it. 回答1: scikit-learn has nearest neighbor search.