Fast kNN from python

Janto Dreijer jantod at gmail.com
Wed Aug 15 10:08:45 CEST 2007


On Aug 14, 9:27 pm, Sean Davis <seand... at gmail.com> wrote:
> On Aug 14, 6:16 am, Janto Dreijer <jan... at gmail.com> wrote:
>
>
>
> > Hi!
>
> > 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.
>
> > I haven't looked at the methods in detail but I think I'm looking for
> > one of the data structures listed onhttp://en.wikipedia.org/wiki/Metric_trees
> > (i.e. vp-trees, cover trees, m-trees or bk trees). But I might be
> > wrong. An approximatekNNwould also work.
>
> > If there doesn't exist such an implementation yet, any advice on a
> > library I can wrap myself would also be appreciated.
>
> > Thanks!
> > Janto
>
> Have you looked at using Rpy and R?  There are probably severalknn
> implementations that then become accessible to you (although I haven't
> checked recently).
>
> Sean

Interesting. I have not looked at that. I can't really find an R
package that does what I want, so any suggestions are appreciated.

Janto




More information about the Python-list mailing list