Plotting weighted mean activations|
Plotting graded activations
Training individual maps
Training more individual maps
Hebbian training on non-symmetric maps
References for SOMs
Training more individual mapsUsing the same pentagonal data, here I'll train the maps using different numbers and arrangements of neurons and different instructions to the algorithm.
The first two maps have 50 neurons, arranged 10x5 in the first map, arranged 5x10 in the second map. The third map has 900 neurons arranged in a 30x30 square. The arrangement affects how many connections each neuron has, that is, those on the borders have fewer connections. The final shape of the map will not necessarily look like a wide or tall rectangle, or like a square.
There are two steps. First, initialization. This can be done by assigning random values or by assigning linear values to the neurons.
Second, training. This can be done sequentially, updating the values of each neuron after each presentation of a data point. Or, training can be done in a 'batch', in which the data is presented as a matrix, the distances and update values are calculated at one time, and the updates to the neuron values are done simultaneously. Batch training is still an iterative process in that the data is presented some number of times (in the cases below, the number of iterations was determined automatically based on the number of neurons and size of the dataset).
|Map 1: 10x5 (as in soms3.html)||Map 2: 5x10||Map 3: 30x30|
|Internal arrangement, not plotted by value but by index, showing most connections:|
|Assigning random values to each neuron, within the range of values of the data, and plotting the neurons according to those assigned values:|
|Training the maps by presenting the data sequentially, updating after every presentation:|
|Starting over, re-initialize the neurons in a linear fashion, so they are spread evenly over (some of) the space defined by the data:|
|Training the linearly initialized maps sequentially:|
|Alternatively, we can use batch training. The maps are initialized randomly, and then the data is presented as a matrix, so many calculations are done "at once", and the updates all happen at the same time. This creates quite different maps (and also works much faster):|