Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97953

Re: Nearest neighbours of points

From Fabien <fabien.maussion@gmail.com>
Newsgroups comp.lang.python
Subject Re: Nearest neighbours of points
Date 2015-10-26 03:25 +0100
Organization Aioe.org NNTP Server
Message-ID <n0k2u1$gqb$2@speranza.aioe.org> (permalink)
References <81947104-f6dd-48b3-ba7b-f03b0c5b6f39@googlegroups.com>

Show all headers | View raw


On 10/24/2015 10:05 PM, Poul Riis wrote:
> With scipy.spatial.distance.pdist


I don't really understand your problem. With 
scipy.spatial.distance.pdist you'll have all you need:

 From the docs:

Returns:	
Returns a condensed distance matrix Y. For each i and j (where i<j<n), 
the metric dist(u=X[i], v=X[j]) is computed and stored in entry ij.

So you have the distances, the indexes of the points so you also have 
the value of these points...

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Nearest neighbours of points Poul Riis <priisdk@gmail.com> - 2015-10-24 13:05 -0700
  Re: Nearest neighbours of points Christian Gollwitzer <auriocus@gmx.de> - 2015-10-24 22:45 +0200
  Re: Nearest neighbours of points Poul Riis <priisdk@gmail.com> - 2015-10-24 15:44 -0700
    Re: Nearest neighbours of points Christian Gollwitzer <auriocus@gmx.de> - 2015-10-25 09:55 +0100
      Re: Nearest neighbours of points Poul Riis <priisdk@gmail.com> - 2015-10-25 05:00 -0700
      Re: Nearest neighbours of points Peter Pearson <pkpearson@nowhere.invalid> - 2015-10-25 17:01 +0000
    Re: Nearest neighbours of points Bartc <bc@freeuk.com> - 2015-10-25 12:36 +0000
  Re: Nearest neighbours of points Fabien <fabien.maussion@gmail.com> - 2015-10-26 03:25 +0100
  Re: Nearest neighbours of points Tom P <werotizy@freent.dd> - 2015-10-31 22:28 +0100
    Re: Nearest neighbours of points Terry Reedy <tjreedy@udel.edu> - 2015-10-31 23:00 -0400

csiph-web