Fast kNN from python

Janto Dreijer jantod at gmail.com
Tue Aug 14 22:52:28 CEST 2007


On Aug 14, 8:44 pm, Miki <miki.teb... at gmail.com> wrote:
> Hello,
>
> > 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.
>
> First Google search for "k-Nearest Neighbors python", yieldedhttp://people.revoledu.com/kardi/tutorial/KNN/resources.html which
> pointed tohttp://biopython.org/DIST/docs/api/public/Bio.kNN-module.html
>
> HTH,
> --
> Miki <miki.teb... at gmail.com>http://pythonwise.blogspot.com

Thanks. Indeed, I did see that page. Unfortunately biopython's knn
does a brute force search for the nearest k and is therefore way too
slow.

Janto




More information about the Python-list mailing list