Multidimensional scaling for visualizing multi-dimensional data

Learn how multidimensional scaling turns a distance matrix into a 2D map. See the steps, a car data example, and how to read the plot.

9 min read3 viewsMultidimensional scaling for visualizing multi-dimensional data
— · 0 votes
Contents
  1. What Is Multidimensional Scaling
  2. How Multidimensional Scaling Works
  3. MDS for Data Visualization
  4. Multidimensional Scaling Example with Car Data
  5. Reading an MDS Plot
  6. MDS Compared with Other Dimensionality Reduction Methods
  7. Practical Steps to Apply MDS
  8. Common Pitfalls in MDS Interpretation
  9. Multidimensional Scaling Questions
  10. What is multidimensional scaling used for?
  11. What is the difference between MDS and PCA?
  12. How do you interpret an MDS plot?
  13. What is a good stress value in MDS?
  14. Can MDS handle non-metric data?

Multidimensional scaling (MDS) is a method that places each object as a point on a two-dimensional map so that distances between points reflect similarities or dissimilarities among the objects. The input is a distance matrix that holds a dissimilarity value for every pair of objects. MDS is a form of dimensionality reduction used in data visualization to reveal structure that is hard to see in a table of many columns.

  • MDS needs a distance matrix where each pair of objects has one dissimilarity number.
  • The output is a scatter plot that is often read as a perceptual map.
  • The stress value tells how well the two-dimensional map keeps the original distances.
  • MDS works with any objects for which you can define a distance, from cars to survey responses.

What Is Multidimensional Scaling

Multidimensional scaling is a technique that takes a table of distances between objects and finds a low-dimensional layout, usually two dimensions, for those objects. The distances in the input table can come from measurements or from judgments, such as how similar two products seem. The technique produces coordinates for each object in the new space, and those coordinates can be plotted as points on a map.

MDS belongs to the family of ordination methods that arrange items along axes according to their relationships. The goal is not to explain the axes in advance but to let the arrangement of points reveal patterns. The output is often called a perceptual map when the input distances came from human judgments rather than physical measurements.

The central idea is that objects that are close together in the original high-dimensional space should be close together on the map. MDS finds coordinates that minimize the difference between the original distances and the distances in the new low-dimensional space. That difference is captured by a number called stress, and a lower stress means a better fit.

How Multidimensional Scaling Works

Multidimensional scaling begins with a distance matrix that contains a dissimilarity value for every pair of objects. A dissimilarity value can be a measured difference, such as the difference in length between two cars, or it can come from a survey question that asks how different two brands feel. The matrix must be square and symmetric, with zeros on the diagonal because an object is not dissimilar from itself.

The algorithm then searches for coordinates in a target number of dimensions, often two, that recreate the distances as closely as possible. It starts with a random placement and repeatedly moves points to reduce stress. The stress value is a single number, and values close to zero indicate that the two-dimensional distances match the original distances almost perfectly.

There are different types of MDS. Classical MDS, also called principal coordinates analysis, works on Euclidean distances and gives a unique solution. Nonmetric MDS works on the rank order of distances and is useful when only the ordering of similarities matters. The choice depends on the nature of the input data.

MDS for Data Visualization

Data visualization uses multidimensional scaling to create a two-dimensional picture of high-dimensional data. When a dataset has many columns, it is impossible to plot the rows directly because each column would require an axis. MDS condenses the information into two axes while trying to keep the relative distances among rows.

The resulting scatter plot allows you to see clusters, outliers, and gradients in the data. For example, if rows are cars and columns are attributes like length, width, horsepower, and fuel consumption, MDS can show which cars are similar across all attributes. Cars that appear near each other on the plot are similar in the high-dimensional space.

MDS is especially useful when the data is described by many correlated variables. Unlike plotting two selected variables, MDS uses all variables at once. The axes themselves have no fixed meaning; they are combinations of the original variables that best spread the points. This is why the map must be interpreted by looking at the relative positions of points and the characteristics of the objects they represent.

Multidimensional Scaling Example with Car Data

Consider a small example of visualizing car data with MDS. Suppose you have five car models and you measure three attributes: length in meters, engine power in kilowatts, and fuel consumption in liters per 100 kilometers. You can compute the Euclidean distance between every pair of cars from these three measurements. The distance matrix holds those values.

Applying multidimensional scaling to that distance matrix produces coordinates in two dimensions. The coordinates might place the cars roughly according to a combination of size and power on one direction, and fuel efficiency on another. You can plot the five points and label them with the car model names.

The plot reveals that two compact hybrid cars sit close together because their length, power, and fuel consumption are similar. A large sports utility vehicle appears far from them because it differs in all three attributes. This visual grouping is the main value of MDS: it shows relationships that are tedious to read from a table.

Reading an MDS Plot

Reading an MDS plot starts with looking at which points are near each other and which are far apart. Points that are close together represent objects that are similar according to the input distances. Points that are far apart represent objects that are dissimilar. The distance between two points on the plot approximates the dissimilarity value from the original matrix.

The orientation of the plot is arbitrary. You can rotate, flip, or mirror the entire plot without changing the distances, so the axes have no inherent meaning. The scaling of the axes is also arbitrary, and the unit of distance is not the original unit of measurement. What matters is the relative distances among points.

Often you can overlay additional information on the points, such as color coding by category or size by another variable. This can help interpret the dimensions. For car data, you might color points by vehicle type or by price class. If a direction in the plot aligns with a known variable, that variable likely contributes to that dimension.

MDS Compared with Other Dimensionality Reduction Methods

Multidimensional scaling is one of several dimensionality reduction methods used for visualization. Principal component analysis (PCA) reduces dimensions by finding directions of maximum variance in the data. PCA works directly on the data matrix, whereas MDS works on a distance matrix. Both can produce similar results when Euclidean distances are used.

Another popular method for visualization is t-distributed stochastic neighbor embedding (t-SNE). t-SNE is designed to preserve local neighborhoods, so it often creates separated clusters. MDS tends to preserve global distances, meaning that the overall spread of points matters. The choice between MDS and t-SNE depends on whether you care more about the global structure or the local clusters.

For data where you have raw measurements, PCA is a natural first step because it gives linear combinations of the original variables. MDS is more flexible because it can accept any distance measure, including non-Euclidean dissimilarities such as ratings from a survey. MDS is the method of choice when your data starts as a distance matrix or when you want to compare perceptual judgments.

Practical Steps to Apply MDS

Applying multidimensional scaling involves a few practical steps. First, prepare your data as a distance matrix. If you have raw measurements, compute distances between every pair of objects using an appropriate measure such as Euclidean distance for continuous variables or Jaccard distance for binary variables. Second, choose the type of MDS and the target number of dimensions, typically two for visualization.

Third, run the MDS algorithm using statistical software or a programming library. Software will output the coordinates for each object in the low-dimensional space and the stress value. Fourth, examine the stress value to assess the fit. If stress is high, the two-dimensional representation may be misleading, and you might consider adding a third dimension or using a different type of MDS.

Fifth, create a scatter plot of the coordinates and label the points. Color or shape can be used to represent categories. Sixth, interpret the plot by examining clusters and distances. Check whether the arrangement matches known properties of the objects. If not, revisit the distance calculation or MDS settings.

Common Pitfalls in MDS Interpretation

One pitfall in multidimensional scaling is overinterpreting the axes. The axes are not directly interpretable as original variables. They are latent dimensions that emerge from the distance relationships. You can discover what they might represent by correlating axis coordinates with original variables, but that is a post hoc analysis.

Another pitfall is ignoring the stress value. A high stress means the two-dimensional map distorts many distances. In that case, nearby points may not truly be similar, and far points may not be truly dissimilar. Always report and consider stress before drawing conclusions.

A third pitfall is using MDS with missing distances. The distance matrix must be complete. If some pairs lack a dissimilarity value, you must either fill them with an estimate or exclude those objects. When distances come from different sources, ensure they are on the same scale. Otherwise the largest distances will dominate the solution.

  • Check that the distance matrix is complete and symmetric.
  • Always examine the stress value for the chosen dimensionality.
  • Do not interpret the axes as direct measurements.
  • Rotate the plot to see if clusters remain stable.
  • Validate findings with domain knowledge.

Multidimensional Scaling Questions

What is multidimensional scaling used for?

Multidimensional scaling is used to create a two-dimensional map from a distance matrix, revealing similarities among objects. It is applied in market research to build perceptual maps, in psychology to model similarity judgments, and in many fields to visualize high-dimensional data.

What is the difference between MDS and PCA?

MDS starts with a distance matrix, whereas PCA starts with the original data matrix and finds directions of maximum variance. Classical MDS with Euclidean distances gives the same result as PCA when the data is centered. MDS is more flexible because it can use any dissimilarity measure.

How do you interpret an MDS plot?

You interpret an MDS plot by looking at the distances between points. Points close together are similar, points far apart are dissimilar. The axes have no fixed meaning, so you can rotate the plot. Overlaying labels or colors helps identify groups and gradients.

What is a good stress value in MDS?

A stress value below 0.1 is often considered an acceptable fit. Values between 0.1 and 0.2 may still be usable but should be interpreted with caution. Values above 0.2 indicate a poor fit. The exact threshold depends on the number of objects and the data.

Can MDS handle non-metric data?

Yes, nonmetric MDS handles data where only the rank order of dissimilarities is meaningful. It uses a monotonic transformation of the input distances. This is useful for ordinal data such as survey ratings where you cannot assume equal intervals.

Read next

Latest articles