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")
Run the code above in your browser using DataLab