# Multidimensional scaling pseudo-code

I am planning to write a program that performs MDS. Any pointers to where I can access the pseudo-code for MDS? Thanks!

-
what is a pseudo code? – EDi Apr 7 '11 at 16:10
– whuber Apr 7 '11 at 16:50
Try Wikipedia page about MDS, especially the "External links" section. – mbq Apr 7 '11 at 18:51

There are different kind of MDS (e.g., see this brief review). Here are two pointers:

• the smacof R package, developed by Jan de Leeuw and Patrick Mair has a nice vignette, Multidimensional Scaling Using Majorization: SMACOF in R (or see, the Journal of Statistical Software (2009) 31(3)) -- R code is available, of course.
• there are some handouts on Multidimensional Scaling, by Forrest Young, where several algorithms are discussed (including INDSCAL (Individual Difference Scaling, or weighted MDS) and ALSCAL, with Fortran source code by the same author) -- this two keywords should help you to find other source code (mostly Fortran, C, or Lisp).

You can also look for "Manifold learning" which should give you a lot of techniques for dimension reduction (Isomap, PCA, MDS, etc.); the term was coined by the Machine Learning community, among others, and they probably have a different view on MDS compared to psychometricians.

-

If you have the Statistics Toolbox in MATLAB you can read the source code of mdscale.m. While it's not pseudocode, it will definitely help you understand MDS better and gives you one approach to coding it.

In MATLAB you can type

 edit mdscale 

and that will open up an editor window that shows you the mdscale.m script that does the work. If you don't have MATLAB, check out Scikits.learn. It has some code for MDS. A lot of times reading Python code is very similar to reading pseudocode!

-
 thanks for your helpful feedback – Anjan Apr 8 '11 at 13:58