Dear All,

Who can I use Self Organizing Map (SOM) results to cluster samples? I have
tried following but this gives me only the clustering of grids, while I
want to cluster (150) samples:

library(kohonen)
iris.sc <- scale(iris[, 1:4])
iris.som <- som(iris.sc, grid=somgrid(xdim = 3, ydim=3, topo="hexagonal"),
               rlen=100, alpha=c(0.05,0.01))
##hierarchical clustering
groups <- 3
iris.hc <- cutree(hclust(dist(iris.som$codes[[1]])), groups)
iris.hc
#V1 V2 V3 V4 V5 V6 V7 V8 V9
#1  1  2  1  1  2  3  3  2


Can anyone help me with this please?
--
Tina

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to