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.
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.
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.
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.
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.
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.
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.
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.
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.