Main Concept¶
Multi-Dimensional Scaling (MDS) aims to find a low-dimensional representation of data based on a matrix of pairwise dissimilarities (or distances). Unlike methods that operate directly on the data points themselves, MDS works with a dissimilarity matrix that encodes the relationships between data points. The core idea is to find a configuration of points in a lower-dimensional space such that the distances between these points closely match the given dissimilarities. MDS transforms the original data representation by creating a new set of coordinates in a lower-dimensional space. The coordinates of data points change as they are positioned in this new space to reflect the input dissimilarities.
Theoretical Aspect¶
There are two main types of MDS: Classical MDS (also known as Principal Coordinates Analysis) and Metric/Non-metric MDS.
Classical MDS:
Classical MDS aims to preserve the Euclidean distances between points. Given a matrix of squared distances (where ), the goal is to find a configuration of points in a lower-dimensional space such that the squared Euclidean distances between these points are as close as possible to . The key idea is to use double centering and eigenvalue decomposition.
Metric/Non-metric MDS:
Metric MDS generalizes classical MDS by allowing the input to be any dissimilarity matrix, not necessarily derived from Euclidean distances. It minimizes a stress function that measures the discrepancy between the input dissimilarities and the distances in the low-dimensional space. A common stress function is Kruskal’s stress:
where are the distances in the low-dimensional space, and are the disparities, which are monotonic transformations of the dissimilarities . In metric MDS, . In non-metric MDS, the are chosen to be monotonic with the but not necessarily equal.
The key variables being optimized in both Metric and Non-metric MDS is , the matrix of low-dimensional embeddings.
Solution Methodology¶
Classical MDS:
- Double Centering: Compute the matrix , where is the centering matrix.
- Eigenvalue Decomposition: Perform eigenvalue decomposition of : .
- Embedding: The low-dimensional embedding is given by , where contains the largest eigenvalues and contains the corresponding eigenvectors.
Metric/Non-metric MDS:
- Initialization: Initialize a configuration of points in the low-dimensional space (e.g., randomly or using classical MDS).
- Disparity Computation (Non-metric MDS): Find disparities that are monotonic with the dissimilarities .
- Stress Minimization: Minimize the stress function using an iterative optimization procedure, such as majorization, gradient descent or SMACOF (Scaling by MAjorizing a COmplicated Function).
- Iteration: Repeat steps 2 and 3 until convergence.
The solution involves standard numerical methods like matrix operations, eigenvalue decomposition, and iterative optimization algorithms.
Global Optimality¶
Classical MDS: Classical MDS provides a closed-form solution that is optimal in the sense that it minimizes the squared difference between the squared distances in the low-dimensional space and the input squared distances. It is a globally optimal solution under the assumption that the input dissimilarities are Euclidean distances.
Metric/Non-metric MDS: The iterative optimization procedures used in metric and non-metric MDS do not guarantee finding a global minimum of the stress function. The optimization can get stuck in local minima. The quality of the solution depends on the initialization and the choice of optimization algorithm. Multiple restarts with different initializations are often used to try to find a better solution.
Key limitations of include:
- Sensitivity to noise in distance measurements: MDS relies on accurate pairwise distances. Noise or errors in these distances can significantly distort the resulting embedding.
- Difficulty with non-Euclidean manifolds: MDS assumes that the data can be embedded in a Euclidean space while preserving distances. If the underlying manifold has a significantly different geometry, MDS may struggle.
- Computational complexity of at least for MDS and potentially higher for iterative methods: This makes it computationally expensive for very large datasets.
- Potential for local minima in iterative MDS: Iterative MDS methods use optimization algorithms that can get stuck in local minima, leading to suboptimal embeddings.
Conclusion¶
Multi-Dimensional Scaling is a versatile technique for dimensionality reduction that works with dissimilarity data. Classical MDS provides a closed-form solution for Euclidean distances, while metric and non-metric MDS offer more flexibility for general dissimilarity measures but rely on iterative optimization. A meaningful use case is in sensory analysis, where panelists provide dissimilarity ratings between different products (e.g., wines, cheeses). MDS can then be used to create a perceptual map that visualizes the relationships between the products based on the panelist’s judgments.