MDS

Multidimensional scaling is next up in my continuing series of Python implementations of famous algorithms. Suppose you have the interpoint distances between some set of points and you want to plot some set of points (preferably 2-D) that have approximately the same interpoint distances. Well, multidimensional scaling provides just such a method.

You can find my implementation here.

Here is an array of 100 points:

Here is are the points generated by mds applied to the interpoint distances:

As you can see, mds recovers the original points up to some isometry.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Technorati
  • Furl
  • StumbleUpon
  • Tumblr
  • TwitThis
4 Responses to “MDS”
  1. Bnyks says:

    Does this mean that Global warming is real?

  2. aniche says:

    hey thanks for this algorithm,
    it was just what i was looking for
    did you use ordinal or ratio mds?
    did you calculate using stress reduction or fractional reduction?
    thanks

  3. Elias says:

    I only had a quick look, but I’m pretty confident this is not standard non-linear MDS, instead it seems that you’re doing a principal component analysis (projecting the input space onto the first to principal components).

  4. JS says:

    I believe this method is called classical MDS, and is closely related to PCA.

  5.  
Leave a Reply