Self Organizing Maps

Stepping through the algorithm:

1. Randomize the map's nodes' weight vectors
2. Grab an input vector
3. Traverse each node in the map
        a) Use Euclidean distance formula to find similarity between the input vector and the map's node's weight vector
        b) Track the node that produces the smallest distance (this node is the best matching unit, BMU)
4. Update the nodes in the neighbourhood of BMU by pulling them closer to the input vector
        Wv(t + 1) = Wv(t) + Θ(t)α(t)(D(t) - Wv(t))
5. Increment t and repeat from 2 while t < λ


I am fascinated with SOM for two reasons:
More:

SOM training with Matlab NN Toolbox

Save the third and fourth column of the data section from mknn/iris.txt into i34.txt (in ANSI not UTF-8 encoding !)

>> load 'i34.txt'
>> net = newsom([0 6; 0 6;] , [6 6]);
>> plot(i34(:,1),i34(:,2),'.g','markersize',20)
>> hold on
>> plotsom(net.iw{1,1},net.layers{1}.distances)
>> net.trainParam.epochs = 100;
>> net = train(net,transpose(i34));
TRAINR, Epoch 0/100
TRAINR, Epoch 25/100
TRAINR, Epoch 50/100
TRAINR, Epoch 75/100
TRAINR, Epoch 100/100
TRAINR, Maximum epoch reached.

>> plotsom(net.iw{1,1},net.layers{1}.distances)

SOM


A simplified taxonomy of SOM networks


Miroslaw Kordos

Creatice Commons License. You are free to copy, share and adapt all articles and software from my web page for noncommercial purposes, provided that you attribute the work to me and place a link to my home page. What you build upon my works may be distributed only under the same or similar license and you may not distort the meaning of my original texts.