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?