# Self organizing maps vs k-means, when the SOM has a lot of nodes

On Wikipedia it says:

It has been shown that while self-organizing maps with a small number of nodes behave in a way that is similar to k-means, larger self-organizing maps rearrange data in a way that is fundamentally topological in character.

What does that means exactly? I understood the first part: A SOM with small nodes behaves like a k-means algorithm. But for a larger SOM, what does it mean by "fundamentally topological in character"? It makes no sense to me.

So Basically my questions are:

1. What is "..fundamentally topological in character..."?
2. What is the difference between a SOM and k-means, when the SOM has a high number of nodes?
• I have read that the SOM behaves exactly like k-means if the neighbourhood radius is set to zero. I don't think it has anything to do with the number of nodes. In a practical sense, you just set the output map size to match the k of the k-means. – a different ben Sep 27 '16 at 22:30

The idea behind a SOM is that you're mapping high-dimensional vectors onto a smaller dimensional (typically 2-D) space. You can think of it as clustering, like in K-means, with the added difference that vectors that are close in the high-dimensional space also end up being mapped to nodes that are close in 2-D space.

SOMs therefore are said to "preserve the topology" of the original data, because the distances in 2-D space reflect those in the high-dimensional space. K-means also clusters similar data points together, but its final "representation" is hard to visualise because it's not in a convenient 2-D format.

A typical example is with colours, where each of the data points are 3-D vectors that represent R,G,B colours. When mapped to a 2-D SOM you can see regions of similar colours begin to develop, which is the topology of the colour space. I like this tutorial as an explanation, with added code snippets.

The case for a low number of nodes is similar to K-means because you are forcing every vector to match an existing node, acting as a prototype/centroid, without any marging for divergence.

In the case of a high number of nodes, there is margin for slowing transitioning zones, which mimic the space among protopypes/centroids, thus modeling the transformed topological space among samples. This way, the relative distances are 'in some sense' preserved.