About this simulation

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 5 July 2026

A Kohonen self-organising map trains a 2D grid of neurons to represent higher-dimensional input data. For each sample, the Best Matching Unit (BMU = argmin‖x−wᵢ‖) is found and pulled toward the input, along with its neighbours weighted by a Gaussian h = exp(−dᵢ²/2σ²) that shrinks over training. Watch the grid unfold to fit Gaussian clusters, a ring, an RGB colour cube or 4D iris-like data.

🔬 What it shows

A grid of neurons whose weight vectors gradually self-organise to mirror the topology of the chosen dataset, viewable either as raw Weights or as a U-Matrix highlighting cluster boundaries.

🎮 How to use

Set Grid size, Learning rate η and Neighbourhood σ, choose a Dataset (Clusters, Ring, RGB Cube, Iris-like), switch between Weights/U-Matrix tabs, then press ▶ Train or ↺ Reset.

💡 Did you know?

SOMs were invented by Teuvo Kohonen in the 1980s and remain one of the few neural network types that produce a genuinely interpretable 2D map — nearby neurons on the grid end up representing similar inputs, which is why they're still used for visualising high-dimensional data.

Frequently asked questions

What does the BMU (Best Matching Unit) actually do?

For every training sample, the network finds the neuron whose weight vector is closest to that sample (argmin‖x−wᵢ‖) and treats it as the "winner" — that neuron and its neighbours get pulled toward the input, which is the core learning step of the algorithm.

Why does Neighbourhood σ shrink over training instead of staying fixed?

A large σ early on lets whole regions of the grid move together to roughly unfold across the data space; shrinking σ later lets individual neurons fine-tune to their local neighbourhood, which is essential for both global ordering and local accuracy.

What's the difference between the Weights view and the U-Matrix view?

Weights shows each neuron's actual learned vector directly; the U-Matrix instead colours each neuron by its average distance to neighbouring neurons, making cluster boundaries in the data appear as bright ridges even when the raw weights are hard to interpret.

Why does Quantization Error decrease as training progresses?

Quantization Error measures the average distance between each data point and its BMU. As neurons spread out to better cover the input space, that average distance shrinks — a falling Quant. Error stat is the clearest sign the map is converging.

What does the Topo. Error stat measure that Quant. Error doesn't?

Topological Error checks whether the first and second closest neurons for a given input are grid neighbours. If they are far apart on the grid despite being similar in weight-space, the map has "folded" or lost topology preservation, which Quant. Error alone cannot detect.