AI Glossary / AI and machine learning / Intermediate

Sammon mapping

Definition

Sammon mapping is a nonlinear dimensionality-reduction method that places observations in a lower-dimensional space while trying to preserve their pairwise distances. Its error measure gives greater weight to discrepancies involving smaller original distances, making local relationships especially influential.

What it means

A dataset may describe each observation with many measurements, making direct visualization difficult. Sammon mapping seeks a simpler arrangement, often in two dimensions, whose distances resemble the distances calculated from the original data.

The method starts from a distance or dissimilarity representation. What counts as close therefore depends on feature selection, scaling, and the distance measure used before the mapping begins.

Unlike a simple linear projection, the arrangement is optimized directly to reduce a distance-based stress function. The displayed axes do not ordinarily have the direct interpretation of original measurements, such as price or length.

A two-dimensional picture cannot generally preserve every relationship in complex data. The result is an approximation, and the pattern seen in the plot should be interpreted alongside the distortion it introduces. A visually separated group is not automatically a verified category or a causal finding.

How it works

Prepare a meaningful matrix of distances between observations. Standard implementations require positive distances between distinct points, because the stress calculation divides by original distances. Duplicate observations need deliberate handling.

Initialize coordinates in the target space, perhaps from another projection. Compute distances between the current mapped coordinates and compare them with the original distances.

The Sammon stress sums squared distance discrepancies weighted by the reciprocal of each original distance, with a normalization factor. Iteratively adjust coordinates to reduce this stress. The optimization is nonlinear and can depend on initialization.

Inspect the resulting stress, convergence behavior, and stability across suitable runs. Check whether important neighborhoods remain recognizable. For large datasets, pairwise-distance storage and optimization can become expensive. Mapping newly arriving observations also requires a defined procedure; the basic coordinate optimization is not automatically a reusable prediction function.

Three practical examples

1. An analyst visualizes a small collection of products described by several standardized measurements. The map helps explore nearby items while keeping the original distance definition visible.

2. A student compares Sammon mapping with a linear projection on synthetic data. Differences in neighborhood preservation illustrate that dimensionality-reduction methods optimize different criteria.

3. A research team reruns the mapping from several initial arrangements. If a particular visual separation changes substantially, the team treats it cautiously rather than presenting one attractive plot as definitive.

Think of it this way

Think of arranging towns on a small sheet so that distances between them resemble a supplied distance table. Some compromises are necessary when the table reflects a more complicated geometry than the sheet can express.

Sammon mapping gives particular attention to nearby pairs. The analogy is limited because data distances need not correspond to physical travel, and the final orientation has no inherent compass direction. Rotating the map does not change its pairwise distances or meaning.

Worked example

Suppose two pairs have original distances 1 and 10. In a proposed map, each pair's distance is wrong by 0.5. Ignoring the shared normalization factor, their contributions to Sammon stress are 0.5²/1 = 0.25 and 0.5²/10 = 0.025.

The same absolute error contributes ten times as much for the closer pair. This illustrates why small original distances receive greater weight.

The calculation considers only two contributions, not a complete map. Moving one point changes its distances to many other points, so improving one pair can worsen another. Optimization must balance all included relationships. A small overall stress should still be checked against the particular neighborhoods relevant to the analysis.

Illustrative case study

Fictional case: Hazel Design compares prototype materials using several laboratory measurements. The team standardizes the features and uses Sammon mapping to create an exploratory chart.

Reviewers notice that two prototypes appear close, then inspect their original measurements and distance. They also rerun the mapping with different initial coordinates to check whether the apparent grouping is stable.

The chart becomes a discussion aid alongside the measurement table. This invented case illustrates exploration, not proof that the materials are interchangeable. It makes no claim that a low-dimensional plot can replace technical performance tests or determine the best design choice by itself.

Common misconceptions and mistakes

Do not interpret the displayed axes as original features unless an additional analysis supports that interpretation.

Do not assume the map preserves every distance equally well. The objective weights discrepancies according to original distance.

Do not ignore feature scaling: changing it can change the input geometry before mapping. Avoid treating one initialization as a guaranteed global optimum. Finally, do not confuse an exploratory embedding with a classifier or assume that newly observed points can be inserted without specifying how their coordinates are obtained.

Business use

Sammon mapping can help teams explore relationships in modest-sized collections of multivariate observations. It is most useful when a distance-based view supports discussion and when the limitations of the projection are understood.

Document preprocessing, the distance measure, target dimension, initialization, and final stress. Compare the map with simpler alternatives and with the underlying records. Business decisions should use the original evidence and task requirements; the visualization helps reveal questions rather than supplying an automatic ranking.

People also ask

Is Sammon mapping the same as PCA?

No. PCA uses a linear projection, while Sammon mapping optimizes a weighted pairwise-distance stress.

Why can duplicate observations cause difficulty?

A zero original distance between distinct observations creates a denominator problem in the standard stress formula.

Does a rotated map tell a different story?

No. Rotation preserves the mapped pairwise distances, so orientation alone has no substantive meaning.

Check your understanding

Two pairs have equal absolute distance error, but one pair was much closer in the original space. Which contributes more to standard Sammon stress?

Answer: The originally closer pair, because its squared discrepancy is divided by a smaller original distance, before the common normalization is applied.

Related terms

  • Dimensionality reduction
  • Multidimensional Scaling
  • Embedding
  • Principal component analysis
  • pairwise distance
  • stress function
  • feature scaling
  • nonlinear optimization

Learn next

Learn how a distance matrix is built from a small table. Calculate several weighted stress contributions by hand, then compare mappings under different feature scales and initializations. Inspect original distances whenever a plotted neighborhood appears important.

More in AI and machine learning

  • Rule-based machine learning - Rule-based machine learning uses rules as a central part of a model learned or adapted from data.
  • Rule induction - Rule induction is the process of learning explicit rules from observed examples.
  • Rules extraction system family - The rules extraction system family, commonly called the RULES family, is a group of related inductive-learning algorithms that derive explicit if-then rules...
  • Scalar - A scalar is a single number, as opposed to a list, table or grid of numbers; it carries one value with no direction or structure attached.
  • Scaling - Scaling is rescaling numeric features to comparable ranges, so that no variable dominates a model merely because of the units it happens to be measured in.
  • Schema-agnostic databases - Schema-agnostic databases, in the query-interface sense, let users request information without first knowing the database's exact structure or vocabulary.

Sources

MASS package authors, Sammon's Non-Linear Mapping documentation: https://stat.ethz.ch/R-manual/R-devel/library/MASS/html/sammon.html. Official Arguments and Details consulted independently for positive dissimilarities, initialization, normalized stress, iterative optimization, and quadratic computational cost. The documentation references Sammon's 1969 paper; direct review of that paper is not claimed. Original stress contributions were independently checked; the design case is fictional.

Previous: Salt-and-pepper noise Next: Sample

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer