Multidimensional scaling

From HandWiki
Short description: Set of related ordination techniques used in information visualization
An example of classical multidimensional scaling applied to voting patterns in the United States House of Representatives. Each red dot represents one Republican member of the House, and each blue dot one Democrat.

Multidimensional scaling (MDS) is a means of visualizing the level of similarity of individual cases of a dataset. MDS is used to translate "information about the pairwise 'distances' among a set of [math]\displaystyle{ n }[/math] objects or individuals" into a configuration of [math]\displaystyle{ n }[/math] points mapped into an abstract Cartesian space.[1]

More technically, MDS refers to a set of related ordination techniques used in information visualization, in particular to display the information contained in a distance matrix. It is a form of non-linear dimensionality reduction.

Given a distance matrix with the distances between each pair of objects in a set, and a chosen number of dimensions, N, an MDS algorithm places each object into N-dimensional space (a lower-dimensional representation) such that the between-object distances are preserved as well as possible. For N = 1, 2, and 3, the resulting points can be visualized on a scatter plot.[2]

Core theoretical contributions to MDS were made by James O. Ramsay of McGill University, who is also regarded as the founder of functional data analysis.[3]


MDS algorithms fall into a taxonomy, depending on the meaning of the input matrix:

Classical multidimensional scaling

It is also known as Principal Coordinates Analysis (PCoA), Torgerson Scaling or Torgerson–Gower scaling. It takes an input matrix giving dissimilarities between pairs of items and outputs a coordinate matrix whose configuration minimizes a loss function called strain,[2] which is given by [math]\displaystyle{ \text{Strain}_D(x_1,x_2,...,x_n)=\Biggl(\frac{ \sum_{i,j} \bigl( b_{ij} - x_i^T x_j \bigr)^2}{\sum_{i,j}b_{ij}^2} \Biggr)^{1/2}, }[/math] where [math]\displaystyle{ x_{i} }[/math] denote vectors in N-dimensional space, [math]\displaystyle{ x_i^T x_j }[/math] denotes the scalar product between [math]\displaystyle{ x_{i} }[/math] and [math]\displaystyle{ x_{j} }[/math], and [math]\displaystyle{ b_{ij} }[/math] are the elements of the matrix [math]\displaystyle{ B }[/math] defined on step 2 of the following algorithm, which are computed from the distances.

Steps of a Classical MDS algorithm:
Classical MDS uses the fact that the coordinate matrix [math]\displaystyle{ X }[/math] can be derived by eigenvalue decomposition from [math]\displaystyle{ B=XX' }[/math]. And the matrix [math]\displaystyle{ B }[/math] can be computed from proximity matrix [math]\displaystyle{ D }[/math] by using double centering.[4]
  1. Set up the squared proximity matrix [math]\displaystyle{ D^{(2)}=[d_{ij}^2] }[/math]
  2. Apply double centering: [math]\displaystyle{ B=-\frac{1}{2}CD^{(2)}C }[/math] using the centering matrix [math]\displaystyle{ C=I-\frac{1}{n}J_n }[/math], where [math]\displaystyle{ n }[/math] is the number of objects, [math]\displaystyle{ I }[/math] is the [math]\displaystyle{ n \times n }[/math] identity matrix, and [math]\displaystyle{ J_{n} }[/math] is an [math]\displaystyle{ n\times n }[/math] matrix of all ones.
  3. Determine the [math]\displaystyle{ m }[/math] largest eigenvalues [math]\displaystyle{ \lambda_1,\lambda_2,...,\lambda_m }[/math] and corresponding eigenvectors [math]\displaystyle{ e_1,e_2,...,e_m }[/math] of [math]\displaystyle{ B }[/math] (where [math]\displaystyle{ m }[/math] is the number of dimensions desired for the output).
  4. Now, [math]\displaystyle{ X=E_m\Lambda_m^{1/2} }[/math] , where [math]\displaystyle{ E_m }[/math] is the matrix of [math]\displaystyle{ m }[/math] eigenvectors and [math]\displaystyle{ \Lambda_m }[/math] is the diagonal matrix of [math]\displaystyle{ m }[/math] eigenvalues of [math]\displaystyle{ B }[/math].
Classical MDS assumes metric distances. So this is not applicable for direct dissimilarity ratings.

Metric multidimensional scaling (mMDS)

It is a superset of classical MDS that generalizes the optimization procedure to a variety of loss functions and input matrices of known distances with weights and so on. A useful loss function in this context is called stress, which is often minimized using a procedure called stress majorization. Metric MDS minimizes the cost function called “stress” which is a residual sum of squares:

[math]\displaystyle{ \text{Stress}_D(x_1,x_2,...,x_n)=\sqrt{\sum_{i\ne j=1,...,n}\bigl(d_{ij}-\|x_i-x_j\|\bigr)^2}. }[/math]

Metric scaling uses a power transformation with a user-controlled exponent [math]\displaystyle{ p }[/math]: [math]\displaystyle{ d_{ij}^p }[/math] and [math]\displaystyle{ -d_{ij}^{2p} }[/math] for distance. In classical scaling [math]\displaystyle{ p=1. }[/math] Non-metric scaling is defined by the use of isotonic regression to nonparametrically estimate a transformation of the dissimilarities.

Non-metric multidimensional scaling (NMDS)

In contrast to metric MDS, non-metric MDS finds both a non-parametric monotonic relationship between the dissimilarities in the item-item matrix and the Euclidean distances between items, and the location of each item in the low-dimensional space.

Let [math]\displaystyle{ d_{ij} }[/math] be the dissimilarity between points [math]\displaystyle{ i, j }[/math]. Let [math]\displaystyle{ \hat d_{ij} = \| x_i - x_j\| }[/math] be the Euclidean distance between embedded points [math]\displaystyle{ x_i, x_j }[/math].

Now, for each choice of the embedded points [math]\displaystyle{ x_i }[/math] and is a monotonically increasing function [math]\displaystyle{ f }[/math], define the "stress" function:

[math]\displaystyle{ S(x_1, ..., x_n; f)=\sqrt{\frac{\sum_{i\lt j}\bigl(f(d_{ij})-\hat d_{ij}\bigr)^2}{\sum_{i\lt j} \hat d_{ij}^2}}. }[/math]

The factor of [math]\displaystyle{ \sum_{i\lt j} \hat d_{ij}^2 }[/math] in the denominator is necessary to prevent a "collapse". Suppose we define instead [math]\displaystyle{ S=\sqrt{\sum_{i\lt j}\bigl(f(d_{ij})-\hat d_{ij})^2} }[/math], then it can be trivially minimized by setting [math]\displaystyle{ f = 0 }[/math], then collapse every point to the same point.

A few variants of this cost function exist. MDS programs automatically minimize stress in order to obtain the MDS solution.

The core of a non-metric MDS algorithm is a twofold optimization process. First the optimal monotonic transformation of the proximities has to be found. Secondly, the points of a configuration have to be optimally arranged, so that their distances match the scaled proximities as closely as possible.

NMDS needs to optimize two objectives simultaneously. This is usually done iteratively:

  1. Initialize [math]\displaystyle{ x_i }[/math] randomly, e. g. by sampling from a normal distribution.
  2. Do until a stopping criterion (for example, [math]\displaystyle{ S \lt \epsilon }[/math])
    1. Solve for [math]\displaystyle{ f = \arg\min_f S(x_1, ..., x_n ; f) }[/math] by isotonic regression.
    2. Solve for [math]\displaystyle{ x_1, ..., x_n = \arg\min_{x_1, ..., x_n} S(x_1, ..., x_n ; f) }[/math] by gradient descent or other methods.
  3. Return [math]\displaystyle{ x_i }[/math] and [math]\displaystyle{ f }[/math]

Louis Guttman's smallest space analysis (SSA) is an example of a non-metric MDS procedure.

Generalized multidimensional scaling (GMD)

Main page: Generalized multidimensional scaling

An extension of metric multidimensional scaling, in which the target space is an arbitrary smooth non-Euclidean space. In cases where the dissimilarities are distances on a surface and the target space is another surface, GMDS allows finding the minimum-distortion embedding of one surface into another.[5]


The data to be analyzed is a collection of [math]\displaystyle{ M }[/math] objects (colors, faces, stocks, . . .) on which a distance function is defined,

[math]\displaystyle{ d_{i,j} := }[/math] distance between [math]\displaystyle{ i }[/math]-th and [math]\displaystyle{ j }[/math]-th objects.

These distances are the entries of the dissimilarity matrix

[math]\displaystyle{ D := \begin{pmatrix} d_{1,1} & d_{1,2} & \cdots & d_{1,M} \\ d_{2,1} & d_{2,2} & \cdots & d_{2,M} \\ \vdots & \vdots & & \vdots \\ d_{M,1} & d_{M,2} & \cdots & d_{M,M} \end{pmatrix}. }[/math]

The goal of MDS is, given [math]\displaystyle{ D }[/math], to find [math]\displaystyle{ M }[/math] vectors [math]\displaystyle{ x_1,\ldots,x_M \in \mathbb{R}^N }[/math] such that

[math]\displaystyle{ \|x_i - x_j\| \approx d_{i,j} }[/math] for all [math]\displaystyle{ i,j\in {1,\dots,M} }[/math],

where [math]\displaystyle{ \|\cdot\| }[/math] is a vector norm. In classical MDS, this norm is the Euclidean distance, but, in a broader sense, it may be a metric or arbitrary distance function.[6]

In other words, MDS attempts to find a mapping from the [math]\displaystyle{ M }[/math] objects into [math]\displaystyle{ \mathbb{R}^N }[/math] such that distances are preserved. If the dimension [math]\displaystyle{ N }[/math] is chosen to be 2 or 3, we may plot the vectors [math]\displaystyle{ x_i }[/math] to obtain a visualization of the similarities between the [math]\displaystyle{ M }[/math] objects. Note that the vectors [math]\displaystyle{ x_i }[/math] are not unique: With the Euclidean distance, they may be arbitrarily translated, rotated, and reflected, since these transformations do not change the pairwise distances [math]\displaystyle{ \|x_i - x_j\| }[/math].

(Note: The symbol [math]\displaystyle{ \mathbb{R} }[/math] indicates the set of real numbers, and the notation [math]\displaystyle{ \mathbb{R}^N }[/math] refers to the Cartesian product of [math]\displaystyle{ N }[/math] copies of [math]\displaystyle{ \mathbb{R} }[/math], which is an [math]\displaystyle{ N }[/math]-dimensional vector space over the field of the real numbers.)

There are various approaches to determining the vectors [math]\displaystyle{ x_i }[/math]. Usually, MDS is formulated as an optimization problem, where [math]\displaystyle{ (x_1,\ldots,x_M) }[/math] is found as a minimizer of some cost function, for example,

[math]\displaystyle{ \underset{x_1,\ldots,x_M}{\mathrm{argmin}} \sum_{i\lt j} ( \|x_i - x_j\| - d_{i,j} )^2. \, }[/math]

A solution may then be found by numerical optimization techniques. For some particularly chosen cost functions, minimizers can be stated analytically in terms of matrix eigendecompositions.[2]


There are several steps in conducting MDS research:

  1. Formulating the problem – What variables do you want to compare? How many variables do you want to compare? What purpose is the study to be used for?
  2. Obtaining input data – For example, :- Respondents are asked a series of questions. For each product pair, they are asked to rate similarity (usually on a 7-point Likert scale from very similar to very dissimilar). The first question could be for Coke/Pepsi for example, the next for Coke/Hires rootbeer, the next for Pepsi/Dr Pepper, the next for Dr Pepper/Hires rootbeer, etc. The number of questions is a function of the number of brands and can be calculated as [math]\displaystyle{ Q = N (N - 1) / 2 }[/math] where Q is the number of questions and N is the number of brands. This approach is referred to as the “Perception data : direct approach”. There are two other approaches. There is the “Perception data : derived approach” in which products are decomposed into attributes that are rated on a semantic differential scale. The other is the “Preference data approach” in which respondents are asked their preference rather than similarity.
  3. Running the MDS statistical program – Software for running the procedure is available in many statistical software packages. Often there is a choice between Metric MDS (which deals with interval or ratio level data), and Nonmetric MDS[7] (which deals with ordinal data).
  4. Decide number of dimensions – The researcher must decide on the number of dimensions they want the computer to create. Interpretability of the MDS solution is often important, and lower dimensional solutions will typically be easier to interpret and visualize. However, dimension selection is also an issue of balancing underfitting and overfitting. Lower dimensional solutions may underfit by leaving out important dimensions of the dissimilarity data. Higher dimensional solutions may overfit to noise in the dissimilarity measurements. Model selection tools like AIC, BIC, Bayes factors, or cross-validation can thus be useful to select the dimensionality that balances underfitting and overfitting.
  5. Mapping the results and defining the dimensions – The statistical program (or a related module) will map the results. The map will plot each product (usually in two-dimensional space). The proximity of products to each other indicate either how similar they are or how preferred they are, depending on which approach was used. How the dimensions of the embedding actually correspond to dimensions of system behavior, however, are not necessarily obvious. Here, a subjective judgment about the correspondence can be made (see perceptual mapping).
  6. Test the results for reliability and validity – Compute R-squared to determine what proportion of variance of the scaled data can be accounted for by the MDS procedure. An R-square of 0.6 is considered the minimum acceptable level.[citation needed] An R-square of 0.8 is considered good for metric scaling and .9 is considered good for non-metric scaling. Other possible tests are Kruskal’s Stress, split data tests, data stability tests (i.e., eliminating one brand), and test-retest reliability.
  7. Report the results comprehensively – Along with the mapping, at least distance measure (e.g., Sorenson index, Jaccard index) and reliability (e.g., stress value) should be given. It is also very advisable to give the algorithm (e.g., Kruskal, Mather), which is often defined by the program used (sometimes replacing the algorithm report), if you have given a start configuration or had a random choice, the number of runs, the assessment of dimensionality, the Monte Carlo method results, the number of iterations, the assessment of stability, and the proportional variance of each axis (r-square).


See also


  1. Mead, A (1992). "Review of the Development of Multidimensional Scaling Methods". Journal of the Royal Statistical Society. Series D (The Statistician) 41 (1): 27–39. "Abstract. Multidimensional scaling methods are now a common statistical tool in psychophysics and sensory analysis. The development of these methods is charted, from the original research of Torgerson (metric scaling), Shepard and Kruskal (non-metric scaling) through individual differences scaling and the maximum likelihood methods proposed by Ramsay.". 
  2. 2.0 2.1 2.2 Borg, I.; Groenen, P. (2005). Modern Multidimensional Scaling: theory and applications (2nd ed.). New York: Springer-Verlag. pp. 207–212. ISBN 978-0-387-94845-4. 
  3. Genest, Christian; Nešlehová, Johanna G.; Ramsay, James O. (2014). "A Conversation with James O. Ramsay". International Statistical Review / Revue Internationale de Statistique 82 (2): 161–183. Retrieved 30 June 2021. 
  4. Wickelmaier, Florian. "An introduction to MDS." Sound Quality Research Unit, Aalborg University, Denmark (2003): 46
  5. "Generalized multidimensional scaling: a framework for isometry-invariant partial surface matching". Proc. Natl. Acad. Sci. U.S.A. 103 (5): 1168–72. January 2006. doi:10.1073/pnas.0508601103. PMID 16432211. Bibcode2006PNAS..103.1168B. 
  6. Kruskal, J. B., and Wish, M. (1978), Multidimensional Scaling, Sage University Paper series on Quantitative Application in the Social Sciences, 07-011. Beverly Hills and London: Sage Publications.
  7. Kruskal, J. B. (1964). "Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis". Psychometrika 29 (1): 1–27. doi:10.1007/BF02289565. 
  8. Leeuw, Jan de; Mair, Patrick (2009). "Multidimensional Scaling Using Majorization: SMACOF in R" (in en). Journal of Statistical Software 31 (3). doi:10.18637/jss.v031.i03. ISSN 1548-7660. 


  • Cox, T.F.; Cox, M.A.A. (2001). Multidimensional Scaling. Chapman and Hall. 
  • Coxon, Anthony P.M. (1982). The User's Guide to Multidimensional Scaling. With special reference to the MDS(X) library of Computer Programs. London: Heinemann Educational Books. 
  • Green, P. (January 1975). "Marketing applications of MDS: Assessment and outlook". Journal of Marketing 39 (1): 24–31. doi:10.2307/1250799. 
  • McCune, B.; Grace, J.B. (2002). Analysis of Ecological Communities. Oregon, Gleneden Beach: MjM Software Design. ISBN 978-0-9721290-0-8. 
  • Young, Forrest W. (1987). Multidimensional scaling: History, theory, and applications. Lawrence Erlbaum Associates. ISBN 978-0898596632. 
  • Torgerson, Warren S. (1958). Theory & Methods of Scaling. New York: Wiley. ISBN 978-0-89874-722-5.