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 is assigned to the node whose weight vector is closest:
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:
is grid distance and 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.
Interaction
The grid has no pan or zoom; it is driven by selecting cells.
| Action | How |
|---|---|
| Hover | Hovering a cell shows its node coordinates, hit count, the value of the current view, and the trial numbers that landed on it (first 10, then a count). |
| Cell values | The value is painted in the middle of each cell whenever it fits. On a fine grid the text is omitted, so read the numbers from the tooltip instead. |
| Select | Left-clicking a cell selects only the trials that landed on it. The selection is shared across charts and stays highlighted in other widgets. |
| Extend selection | Ctrl-click (Cmd on macOS) adds the cell to the selection, or removes it if it was already selected. |
| Clear selection | Right-clicking or double-clicking the grid clears the selection. |
Changing the grid size or the number of epochs retrains the map, which also clears the selection.
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
- Kohonen, T. (1982). Self-organized formation of topologically correct feature maps. Biological Cybernetics, 43(1), 59-69. https://doi.org/10.1007/BF00337288