Lably
Skip to content

Multidimensional scaling

Set of related ordination techniques used in information visualization

  • 8 min read
  • 4 chapters

Related on Lably

Through Cartesian coordinate system, Data and information visualization and Algorithm

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.

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.

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, which is given by StrainD(x1,x2,...,xn)=(∑i,j(bij−xiTxj)2∑i,jbij2)1/2, where xi denote vectors in N-dimensional space, xiTxj denotes the scalar product between xi and xj, and bij are the elements of the matrix B 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 X can be derived by eigenvalue decomposition from B=XX′. And the matrix B can be computed from proximity matrix D by using double centering.
  1. Set up the squared proximity matrix D(2)=[dij2]
  2. Apply double centering: B=−12CD(2)C using the centering matrix C=I−1nJn, where n is the number of objects, I is the n×n identity matrix, and Jn is an n×n matrix of all ones.
  3. Determine the m largest eigenvalues λ1,λ2,...,λm and corresponding eigenvectors e1,e2,...,em of B (where m is the number of dimensions desired for the output).
  4. Now, X=EmΛm1/2 , where Em is the matrix of m eigenvectors and Λm is the diagonal matrix of m eigenvalues of B.
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:

StressD(x1,x2,...,xn)=∑i≠j=1,...,n(dij−‖xi−xj‖)2.

Metric scaling uses a power transformation with a user-controlled exponent p: dijp and −dij2p 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 (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 dij be the dissimilarity between points i,j. Let d^ij=‖xi−xj‖ be the Euclidean distance between embedded points xi,xj.

Now, for each choice of the embedded points xi and is a monotonically increasing function f, define the "stress" function:

S(x1,...,xn;f)=∑i<j(f(dij)−d^ij)2∑i<jd^ij2.

The factor of ∑i<jd^ij2 in the denominator is necessary to prevent a "collapse". Suppose we define instead S=∑i<j(f(dij)−d^ij)2, then it can be trivially minimized by setting f=0, 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 xi randomly, e. g. by sampling from a normal distribution.
  2. Do until a stopping criterion (for example, S<ϵ)
    1. Solve for f=arg⁡minfS(x1,...,xn;f) by isotonic regression.
    2. Solve for x1,...,xn=arg⁡minx1,...,xnS(x1,...,xn;f) by gradient descent or other methods.
  3. Return xi and f

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

Generalized multidimensional scaling (GMDS)

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.

Super multidimensional scaling (SMDS)

An extension of MDS, known as Super MDS, incorporates both distance and angle information for improved source localization. Unlike traditional MDS, which uses only distance measurements, Super MDS processes both distance and angle-of-arrival (AOA) data algebraically (without iteration) to achieve better accuracy.

The method proceeds in the following steps:

  1. Construct the Reduced Edge Gram Kernel: For a network of N sources in an η-dimensional space, define the edge vectors as vi=xm−xn. The dissimilarity is given by ki,j=⟨vi,vj⟩. Assemble these into the full kernel K=VVT, and then form the reduced kernel using the N−1 independent vectors: K¯=[V](N−1)×η[V](N−1)×ηT,
  2. Eigen-Decomposition: Compute the eigen-decomposition of K¯,
  3. Estimate Edge Vectors: Recover the edge vectors as V^=(UM×ηΛη×η⊙12)T,
  4. Procrustes Alignment: Retrieve V^ from V via Procrustes Transformation,
  5. Compute Coordinates: Solve the following linear equations to compute the coordinate estimates (1|01×N−1[C]N−1×N)⋅(x1[X]N−1×η)=(x1[V]N−1×η),

This concise approach reduces the need for multiple anchors and enhances localization precision by leveraging angle constraints.

Sign in to keep reading

3 more chapters are free with a Lably account.

More in Statistics