Self Organizing Maps: How is the location computed and updated?

I have read other similar questions on here, but I am still unsure how SOM deals with the positions/locations of the neurons.

Say that the input space is N-dimensional. I initalise some weights, and then in the competition step, I find the closest neuron to the current input point using for example Euclidean distance. But I don't understand how I update the position of neurons next -- did I initialise random positions for each neuron at the beginning? In what direction do I move the neuron? I know that the position of the neuron will eventually be the 2-D space that I embed the N-dimensional data in, but I can't figure out how it works during training.

Yes, you initialize the weights/positions randomly. The position update during learning consists in moving the position of the best matching unit (BMU) and its neighbors towards the input. From Wikipedia:

The update formula for a neuron v with weight vector Wv(s) is

Wv(s + 1) = Wv(s) + Θ(u, v, s) α(s)(D(t) - Wv(s))

, where s is the step index, t an index into the training sample, u is the index of the BMU for D(t), α(s) is a monotonically decreasing learning coefficient and D(t) is the input vector; Θ(u, v, s) is the neighborhood function which gives the distance between the neuron u and the neuron v in step s.

Regarding the 2D space, it is just the map coordinates of your neurons. You'll never explicitly convert your N-D space into a 2D space, the SOM neurons' weights will always be N-dimensional.

You may be confused by images like this one:

which represent your data as a 2D lattice, but that's because the input data is also 2D (the points in the figure)! If your input space is N-D (N > 2), you can't use this type of representation. For instance, if you're working with images, you may represent the learned SOM like this: note that the stored data is still N-D (the images), just their organization is 2D.

• Thanks for the answer! However, I still don't quite get it. What is the relation between the weights and the position of the neuron? You said "moving the position of the best matching unit (BMU) and its neighbors towards the input.".. but I thought the position was 2D, and the input is N-dimensional. How do you move it towards it then? I think I understand how the weights are updated, but I don't understand how the positions are updated at each step. – confused00 Apr 11 '16 at 8:04
• Position = weights, same dimensionality as input. Usually we say "position in map space" when referring to the 2D position on the map (this one is not updated explicitly). – rcpinto Apr 11 '16 at 10:42
• but the 2D position is the one used to visualise the final organisation, no? My question relates to how the 2D position is updated every step to culminate in the final 2D positions. – confused00 Apr 11 '16 at 21:04
• It isn't. The neighborhood update rule makes close neurons to be similar implicitly. – rcpinto Apr 11 '16 at 22:22
• in your 2nd image, the 2D position of the images is what gives the final organisation, and is the position that my question relates to. What's the neighbourhood update rule? In the equation posted there is a neighbourhood function which is only used to update the weights, not the 2D position. – confused00 Apr 12 '16 at 13:16