[SciPy-user] Finding Neighboors

Lou Pecora lou_boog2000 at yahoo.com
Wed Aug 1 10:45:24 EDT 2007


If you are using a data set that is static, i.e. you
are not adding or deleting data points, then you
should check out nearest neighbor searches using
slices along various directions.  It's *much* easier
to code than k-d trees and is about as efficient.  The
reference is,

Nene and Nayer, IEEE TRANSACTIONS ON PATTERN ANALYSIS
AND MACHINE INTELLIGENCE, VOL. 19, NO. 9, SEPTEMBER
1997, pg. 989

If your data is changing a lot as you are doing
searches, then as I understand it, k-d trees are
better to use since you can delete and insert nodes
easily.

--- Emanuele Zattin <emanuelez at gmail.com> wrote:

> Hi, you might want to take a look at kd-trees. No
> implementation in
> scipy, but it should not be too hard to achieve. As
> far as i can
> remember its definition in wikipedia includes some
> python code. Just
> my 2 cents :)



-- Lou Pecora,   my views are my own.
---------------
Great spirits have always encountered violent opposition from mediocre minds. 
-Albert Einstein


      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 



More information about the SciPy-User mailing list