SOM: attributes vs changes

576 Views Asked by At

Suppose I have a trained SOM: mySom. I want to test its quality. An interesting paper gives a suggestion: using summary(mySom). Doing that it results:

som map of size 5x5 with a hexagonal topology.
Training data included; dimension is 1017 by 24
Mean distance to the closest unit in the map: 0.02276404 

So, mean(somres$distances) = 0.02276404 seems to be the mean distance of all the elements from the closest prototype. Nevertheless, another measure should represent the same value: mySom$changes. Printing those values we find:

> somres$changes
               [,1]
  [1,] 0.0053652766
  [2,] 0.0054470742
  [3,] 0.0054121733
  [4,] 0.0054452036
  ...
  [97,] 0.0010324613
  [98,] 0.0009807617
  [99,] 0.0010183714
  [100,] 0.0010220923

After having presented the inputs to the SOM 100 times we have a mean distance of every unit from the nearest one of: 0.0010220923.

Problem: mySom$changes[100] != mean(somres$distances). Why?

1

There are 1 best solutions below

0
On

The first quality measure you describe "Mean distance to the closest unit in the map" is the quantization error of the som map, see http://www.ifs.tuwien.ac.at/~poelzlbauer/publications/Poe04WDA.pdf. It is computed by determining the average distance of the sample vectors to the cluster centroids by which they are represented. In case of the SOM, the cluster centroids are the prototype vectors. This value is computed after the training process. The second one seem to be computed per iteration. In SOM, two values vary with iterations: the learning rate and the neighbourhood distance see this for a summary of SOM features. Try relating the 100 values to the initial and final values of the SOM parameters.