Tunny Icon
TunnyDocs

The next-gen Grasshopper optimization tool.

SOM Map

The SOM Map widget trains a self-organizing map on the standardized feature space and displays it as a topology-preserving 2D grid.

It can switch among three views: the U-matrix (neighbor-cell distances, revealing cluster boundaries), component planes (how one variable changes across the map), and hit counts (how many trials fall onto each cell).

A SOM maps high-dimensional trial space onto a 2D lattice. Cells that are near each other on the grid are trained to represent similar points in the original space. Rather than forcing a fixed number of clusters, it provides a continuous map for reading cluster-like regions, gradients, and outliers.

Learning intuition

1. Standardization

Input columns are standardized to zero mean and unit variance before training. This prevents distance calculations from being dominated by columns that simply have larger numeric scales.

2. BMU (Best Matching Unit)

Each data point xx is assigned to the node whose weight vector wiw_i is closest:

b(x)=argminixwi2b(x) = \arg\min_i \lVert x - w_i \rVert^2

3. Batch update

Tunny Dashboard uses batch SOM. Instead of updating one sample at a time, each epoch first computes BMUs for all points, then updates each node weight using a Gaussian-neighborhood weighted average:

wixh(b(x),i)xxh(b(x),i),h(b,i)=exp ⁣(dgrid(b,i)22σ(t)2)w_i \leftarrow \frac{\sum_x h\bigl(b(x), i\bigr), x}{\sum_x h\bigl(b(x), i\bigr)}, \qquad h(b, i) = \exp!\left(-\frac{d_{\text{grid}}(b, i)^2}{2,\sigma(t)^2}\right) dgridd_{\text{grid}} is grid distance and σ(t)\sigma(t) is neighborhood radius. As learning proceeds, the neighborhood shrinks: early epochs shape global structure, later epochs refine local structure.

4. Deterministic initialization

Initialization is not random. As in PCA Biplot, the map is placed using the first two principal-component directions. So with the same data and settings, the map is reproducible.

Reading the three views

  • U-matrix: mean distance from each cell to its up/down/left/right neighbors. High-value ridges indicate boundaries between dissimilar regions.
  • Component planes: for each variable, shows how its node weights vary across the map.
  • Hit counts: number of trials assigned to each cell, useful for seeing dense and sparse regions.

Caveats

  • Too few nodes reduce resolution by collapsing different trials into the same cells; too many nodes create many empty cells and noisy U-matrices.
  • Topology preservation is approximate, not guaranteed. Folding high-dimensional structure into 2D can still introduce local distortions.
  • U-matrix boundaries are visual cues, not statistical significance tests. Interpret together with component planes and hit counts.

References