I wrote an article titled “Self-Organizing Maps Using Python” in the January 2019 issue of Visual Studio Magazine. See https://visualstudiomagazine.com/articles/2019/01/01/self-organizing-maps-python.aspx.
A self-organizing map (SOM) is surprisingly difficult to describe. Briefly, the most common form of a SOM is an n x n grid/map where each square/node in the grid holds a data item. Data items in a square are similar to each other (so you can think of the squares as clusters), but also items in adjacent squares are more similar to items in squares that aren’t adjacent.
Suppose you have 150 data items. Each data item has four values, for example, (5.1, 3.5, 1.4, 0.8). And suppose you create a 30 x 30 SOM. You apply an algorithm that assigns a vector of size for to each of the 900 SOM squares/nodes. When finished, each of the 150 data items is implicitly associated to one of the 900 squares/nodes. Or equivalently, each square/node holds zero or more data items.
After a SOM has been created, it can then be used in several ways. Because each square/node has a coordinate, for example the upper left square/node is (0, 0), each of the 150 data is also associated with a coordinate, and so the data items can be mapped in two-dimensions. This is called dimensionality reduction for visualization.

A SOM used for dimensionality reduction for visualization.
Another way to use a SOM is to construct what’s called a U-Matrix. For the 150-items and 30×30 SOM, a U-Matrix would also be 30×30. Each cell of the U-Matrix has a value where a small value indicates the cell is close to its neighbor cells and a large value indicates the cell is far from its neighbors. If you plot the U-Matrix in grayscale, dark regions are similar, and light regions indicate boundaries between classes. Therefore you gain insights into the data, including an indication of how many natural clusters there are.

A U-Matrix created from a SOM. Light regions are boundaries so, if you squint, it looks like there are two or three natural groupings of the data.
Whew! Very complicated! But very cool, geek-wise.

Four paintings by artist Jeannette Guichard Bunel. I’m not a big fan of pop art styles in general but I think these examples are geek-wise cool. I like the bright colors.

.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference
You must be logged in to post a comment.