Master the foundational linear dimensionality reduction method that preserves pairwise distances. Learn how MDS derives low-dimensional embeddings from distance matrices.
Multidimensional Scaling (MDS) is a linear dimensionality reduction technique that finds a low-dimensional representation of data such that pairwise distances in the original space are preserved as closely as possible in the low-dimensional space.
Given a distance matrix where is the distance between samples and , MDS finds low-dimensional representations such that:
The goal is to preserve distances, making MDS ideal for visualization and distance-based analysis.
The key insight of MDS is converting distance information into inner product information, which enables linear algebra techniques.
For Euclidean distance in low-dimensional space:
Let be the inner product. Then:
To solve for , we center the data (assume mean is zero) and introduce global distance statistics:
Average distance from sample i:
Average distance from sample j:
Global average distance:
Through algebraic manipulation, we can solve for the inner product matrix where :
This formula converts distance information into inner product information, enabling eigenvalue decomposition.
Once we have the inner product matrix , we can find the low-dimensional representation through eigenvalue decomposition.
Decompose the inner product matrix:
Where contains eigenvectors and contains eigenvalues in descending order.
Select the top eigenvalues and corresponding eigenvectors:
Where is the diagonal matrix of top eigenvalues, and contains the corresponding eigenvectors. is the low-dimensional representation.
The top eigenvalues capture the most variance in the distance structure. By keeping only the largest eigenvalues, we:
The complete MDS algorithm:
Given distance matrix where is the distance between samples and .
Calculate global statistics and solve for :
Decompose and select top eigenvalues and eigenvectors.
Compute where each column is a low-dimensional sample.
MDS is a linear dimensionality reduction method. All linear methods can be expressed as:
Where:
Different linear methods differ in how they determine :