On Wed, May 2, 2012 at 5:45 PM, Moroney, Catherine M (388D) <
catherine.m.moro...@jpl.nasa.gov> wrote:

> Thanks to Perry for some very useful off-list conversation.   I realize
> that
> I wasn't being clear at all in my earlier description of the problem so
> here it is
> in a nutshell:
>
> Find the best match in an array t(5000, 7) for a single vector e(7).  Now
> scale
> it up so e is (128, 512, 7) and I want to return a (128, 512) array of the
> t-identifiers
> that are the best match for e.  "Best match" is defined as the minimum
> Euclidean distance.
>
>
It sounds like you want to find the nearest neighbor to a point in a
high-dimensional space. This sounds like a job for a spacial data structure
like a KD-tree.  See:

http://docs.scipy.org/doc/scipy/reference/spatial.html
http://mloss.org/software/view/143/
http://www.mrzv.org/software/pyANN/
etc.

-Kevin
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to