Suvarna Garge (Editor)

Multidimensional scaling

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Multidimensional scaling

Multidimensional scaling (MDS) is a means of visualizing the level of similarity of individual cases of a dataset. It 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. An MDS algorithm aims to place each object in N-dimensional space such that the between-object distances are preserved as well as possible. Each object is then assigned coordinates in each of the N dimensions. The number of dimensions of an MDS plot N can exceed 2 and is specified a priori. Choosing N=2 optimizes the object locations for a two-dimensional scatterplot.

Contents

S t r a i n D ( x 1 , x 2 , . . . , x N ) = ( i , j ( b i j x i , x j ) 2 i , j b i j 2 ) 1 / 2 , where b i j are the terms of the matrix B defined on step 2 of the following algorithm.

S t r e s s = ( f ( x ) d ) 2 d 2

Types

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: For example, given the aerial distances between many cities in a matrix D = [ d i j ] , where d i j is the distance between the coordinates of i t h and j t h city, given by d i j = ( x i x j ) 2 + ( y i y j ) 2 . Now, you want to find the coordinates of the cities. This problem is addressed in classical MDS.

General forms of loss functions called Stress in distance MDS and Strain in classical MDS. The strain is given by:

S t r a i n D ( x 1 , x 2 , . . . , x N ) = ( i , j ( b i j x i , x j ) 2 i , j b i j 2 ) 1 / 2 , where b i j are the terms of the matrix B defined on step 2 of the following algorithm.

Steps of a Classical MDS algorithm: Classical MDS uses the fact that the coordinate matrix can be derived by eigenvalue decomposition from B = X X . And the matrix B can be computed from proximity matrix D by using double centering.
  1. Set up the squared proximity matrix D ( 2 ) = [ d i j 2 ]
  2. Apply double centering: B = 1 2 J D ( 2 ) J using the centering matrix J = I 1 n 11 , where n is the number of objects.
  3. Determine the m largest eigenvalues λ 1 , λ 2 , . . . , λ m and corresponding eigenvectors e 1 , e 2 , . . . , e m of B (where m is the number of dimensions desired for the output).
  4. Now, X = E m Λ m 1 / 2 , where E m is the matrix of m eigenvectors and Λ m is the diagonal matrix of m eigenvalues of B .
Classical MDS assumes Euclidean distances. So this is not applicable for direct dissimilarity ratings.

Metric multidimensional scaling

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:

S t r e s s D ( x 1 , x 2 , . . . , x N ) = ( i j = 1 , . . . , N ( d i j x i x j ) 2 ) 1 / 2

: or, S t r e s s D ( x 1 , x 2 , . . . , x N ) = ( i , j ( d i j x i x j ) 2 i , j d i j 2 ) 1 / 2

Metric scaling uses a power transformation with a user-controlled exponent p : d i j p and d i j 2 p for distance. In classical scaling p = 1 . Non-metric scaling is defined by the use of isotonic regression to nonparametrically estimate a transformation of the dissimilarities.

Non-metric multidimensional scaling

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. The relationship is typically found using isotonic regression: let x denote the vector of proximities, f ( x ) a monotonic transformation of x , and d the point distances; then coordinates have to be found, that minimize the so-called stress,

S t r e s s = ( f ( x ) d ) 2 d 2

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. The basic steps in a non-metric MDS algorithm are:
  1. Find a random configuration of points, e. g. by sampling from a normal distribution.
  2. Calculate the distances d between the points.
  3. Find the optimal monotonic transformation of the proximities, in order to obtain optimally scaled data f ( x ) .
  4. Minimize the stress between the optimally scaled data and the distances by finding a new configuration of points.
  5. Compare the stress to some criterion. If the stress is small enough then exit the algorithm else return to 2.
  • Louis Guttman's smallest space analysis (SSA) is an example of a non-metric MDS procedure.
  • 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.

    Details

    The data to be analyzed is a collection of I objects (colors, faces, stocks, . . .) on which a distance function is defined,

    δ i , j := distance between i -th and j -th objects.

    These distances are the entries of the dissimilarity matrix

    Δ := ( δ 1 , 1 δ 1 , 2 δ 1 , I δ 2 , 1 δ 2 , 2 δ 2 , I δ I , 1 δ I , 2 δ I , I ) .

    The goal of MDS is, given Δ , to find I vectors x 1 , , x I R N such that

    x i x j δ i , j for all i , j 1 , , I ,

    where 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.

    In other words, MDS attempts to find an embedding from the I objects into R N such that distances are preserved. If the dimension N is chosen to be 2 or 3, we may plot the vectors x i to obtain a visualization of the similarities between the I objects. Note that the vectors x i are not unique: With the Euclidean distance, they may be arbitrarily translated, rotated, and reflected, since these transformations do not change the pairwise distances x i x j .

    (Note: The symbol R indicates the set of real numbers, and the notation R N refers to the Cartesian product of N copies of R , which is an N -dimensional vector space over the field of the real numbers.)

    There are various approaches to determining the vectors x i . Usually, MDS is formulated as an optimization problem, where ( x 1 , , x I ) is found as a minimizer of some cost function, for example,

    min x 1 , , x I i < j ( x i x j δ i , j ) 2 .

    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.

    Procedure

    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 Q = N ( N 1 ) / 2 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 (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. The more dimensions, the better the statistical fit, but the more difficult it is to interpret the results.
    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. 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).

    Implementations

  • ELKI includes two MDS implementations.
  • Orange, a free data mining software suite, module orngMDS
  • PC-ORD, Multivariate Analysis of Ecological Data command NMS
  • MATLAB includes two MDS implementations (for classical (cmdscale) and non-classical (mdscale) MDS respectively).
  • The R programming language offers several MDS implementations
  • sklearn contains function sklearn.manifold.MDS
  • usabiliTEST's Online Card Sorting software is utilizing MDS to plot the data collected from the participants of usability tests.
  • ViSta has implementations of MDS by Forrest W. Young. Interactive graphics allow exploring the results of MDS in detail.
  • References

    Multidimensional scaling Wikipedia