Fast kNN from python

Janto Dreijer jantod at gmail.com
Tue Aug 14 10:09:34 EDT 2007


On Aug 14, 3:11 pm, Tim Churches <tc... at optushome.com.au> wrote:
> Janto Dreijer wrote:
> > I am looking for a Python implementation or bindings to a library that
> > can quickly find k-Nearest Neighbors given an arbitrary distance
> > metric between objects. Specifically, I have an "edit distance"
> > between objects that is written in Python.
>
> Orange? Seehttp://www.ailab.si/orange/- not sure about speed, but
> quite a few parts of it are written in C, and it does kNN.
>
> Tim C

Thanks, but I'm actually thinking of "fast" as in computer science
terms. e.g. O(log(n)) lookup time. I'll probably have tens of
thousands of objects to search and the distance calculation is
relatively slow.

>From the documentation it looks like Orange does a brute force search
for the nearest k items.




More information about the Python-list mailing list