topo.error {kohonen} | R Documentation |
The function implements two forms of what is known as 'topographical error', basically a measure of continuity of the mapping. This is done by assessing the distances between units containing similar patterns. See 'Details'.
topo.error(somobj, type = c("nodedist", "bmu"), data)
somobj |
an object of class |
type |
which kind of topographical error to return. See 'Details'. |
data |
used in case |
Two types of topographical error are implemented, depending on the
value of the type
argument:
"nodedist"
: the average distance, in terms of (x, y)
coordinates in the map, between all pairs of most similar codebook
vectors.
"bmu"
: the average distance, in terms of (x, y)
coordinates in the map, between the best matching unit and the
second best matching unit, for all data points.
In both cases, low values indicate a smooth mapping, with similar objects mapped to close-by units.
A number representing the topological error.
"Topology preservation in self-organising maps", K. Kiviluoto, IEEE Int. Conf. on Neural Networks, pp. 294-299 (1996)
"Self-organizing maps", 3rd Ed., T. Kohonen, New York: Springer (2001)
data(yeast) ## take only complete cases X <- yeast[[3]][apply(yeast[[3]], 1, function(x) sum(is.na(x))) == 0,] yeast.som <- som(X, somgrid(5, 8, "hexagonal")) ## quantization error: mean(yeast.som$distances) ## topographical error measures: topo.error(yeast.som, "nodedist") topo.error(yeast.som, "bmu")