[SciPy-User] multi-dimensional scaling

Nelle Varoquaux nelle.varoquaux at gmail.com
Fri May 3 11:20:03 EDT 2013


On 3 May 2013 17:18, Dan Stowell <dan.stowell at eecs.qmul.ac.uk> wrote:

> On 03/05/13 13:39, Nelle Varoquaux wrote:
> >
> >      > I'm looking in scipy for something to perform multi-dimensional
> >      > scaling*. I don't see anything - have I missed it? Is it easy to
> >     make it
> >      > from scipy components?
> >      >
> >      > Thanks
> >      > Dan
> >      >
> >      > * http://en.wikipedia.org/wiki/Multidimensional_scaling
> >
> >
> >     MDS is more a class of approaches than a specific algorithm. If you
> >     want to do "classic" MDS with euclidian distances as the metric,
> >     then you would use PCA to implement that:
> >
> http://stats.stackexchange.com/questions/14002/whats-the-difference-between-principal-components-analysis-and-multidimensional
> >
> >     And PCA is just a simple eigendecomposition that you can build from
> >     the basic linear algebra tools in numpy. I'm happy to send over the
> >     short wrapper code I wrote to do "PCA" on data in a vaguely smart
> >     way, if you want.
> >
> >
> > There are both the classical MDS (smacof algorithm) and NMDS (non
> > metric) in scikit-learn (and PCA :) ).
>
> Thanks both. In my case, for each pair of points I have a list of binary
> values representing match-or-no-match, so I will use Hamming distance
> rather than Euclidean. It looks like sklearn.manifold.MDS(metric=False)
> will do the job for me. Just need to update my installation of sklearn
> to 0.12+...
>
> By the way: the example here
> <http://scikit-learn.org/stable/auto_examples/manifold/plot_mds.html>
> uses a variable called "similarities", but most of the way through they
> are really dissimilarities, and then later (AFTER their use in mds)
> converted to similarities - a touch confusing.
>
> Also, the documentation for fit_transform() here
> <
> http://scikit-learn.sourceforge.net/dev/modules/generated/sklearn.manifold.MDS.html
> >
> just uses "X" and "Input data" and doesn't explicitly say whether it
> expects similarities or dissimilarities. It would really help if the
> documentation was a little clearer about that. (I think it wants
> dissimilarities - please correct me if I'm wrong...)
>

I'll try to improve the documentation on the MDS in the near future. Thanks
for the feedback.

Cheers,
N


>
> Thanks
> Dan
>
> --
> Dan Stowell
> Postdoctoral Research Assistant
> Centre for Digital Music
> Queen Mary, University of London
> Mile End Road, London E1 4NS
> http://www.elec.qmul.ac.uk/digitalmusic/people/dans.htm
> http://www.mcld.co.uk/
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130503/4f2a1832/attachment.html>


More information about the SciPy-User mailing list