5
$\begingroup$

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

$\endgroup$
3

2 Answers 2

8
$\begingroup$

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.

$\endgroup$
5
$\begingroup$

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!

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.