quality function computes several quality criteria
for the result of a SOM algorithm.
quality(sommap, quality.type, ...)
The quality type to compute. Two types are implemented:
quality function returns either a numeric value (if only
one type is computed) or a list a numeric values (if all types are computed).
The quantization error calculates the mean squared euclidean distance between the sample vectors and their respective cluster prototypes. It is a decreasing function of the size of the map.
The topographic error is the simplest of the topology preservation measure: it calculates the ratio of sample vectors for which the second best matching unit is not in the direct neighborhood of the best matching unit.
Polzlbauer G. (2004) Survey and comparison of quality measures for self-organizing maps. In: Proceedings of the Fifth Workshop on Data Analysis (WDA'04), Paralic, J., Polzlbauer, G., Rauber, A. (eds) Sliezsky dom, Vysoke Tatry, Slovakia: Elfa Academic Press, 67-82.
my.som <- trainSOM(x.data=iris[,1:4]) quality(my.som, quality.type="all")#> $topographic #>  0.1933333 #> #> $quantization #>  0.9992276 #>quality(my.som, quality.type="topographic")#>  0.1933333