[SciPy-dev] Implementing a distance matrix between two sets of vectors concept
Peter Skomoroch
peter.skomoroch@gmail....
Tue Jul 3 13:10:02 CDT 2007
I've rolled my own in the past. If the vectors are really large and you are
holding a collection of them, you probably want to use a sparse matrix data
structure in either numpy or C.
On 7/3/07, Bill Baxter <wbaxter@gmail.com> wrote:
>
> I would use it.
>
> I only need Euclidean distance,
> Python API only is ok.
> Data-types: float and double would do it for me. Double only if it's too
> much effort to do both.
> Order -- all combos of F and C both would be nice, but not critical
> Strides -- with strides better than without, but not critical
> nan -- don't need it.
>
> --bb
>
> On 7/3/07, David Cournapeau < david@ar.media.kyoto-u.ac.jp> wrote:
> >
> > Hi,
> >
> > for my machine learning toolbox, I need the concept of distance
> > matrix, that is for two sets of vectors v and u (N u and M v), of
> > dimension d, I want to compute the matrix D such as d(i,j) =
> > distance(v_i, u_j). This is easy to do in numpy, but for big datasets,
> > this becomes difficult without a significance loss of efficiency or big
> > memory consumption.
> > So I am thinking about implementing it in C. I think the overall
> > concept is useful for other people, so before implementing something, I
> > was wondering if other people would need/use it, and what would they
> > need:
> > - several distance (Euclidian, Mahalanobis, etc...), which would be
> > a separate object to handle different sets of parameters.
> > - C Api ?
> > - datatypes ? Layout ? Contiguity ?
> > - handling Nan ?
> >
> > cheers,
> >
> > David
> > _______________________________________________
> > Scipy-dev mailing list
> > Scipy-dev@scipy.org
> > http://projects.scipy.org/mailman/listinfo/scipy-dev
> >
>
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev@scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
--
Peter N. Skomoroch
peter.skomoroch@gmail.com
http://www.datawrangling.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20070703/1ee50b18/attachment.html
More information about the Scipy-dev
mailing list