[R] cluster samples using self organizing map in R

Bert Gunter bgunter@4567 @end|ng |rom gm@||@com
Wed Oct 10 16:43:37 CEST 2018


Search!

the rseek.org site gives many hits for "self organizing maps", including
the som package among others.

-- Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Oct 9, 2018 at 11:14 PM A DNA RNA <email2mrna using gmail.com> wrote:

> 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 using 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.
>

	[[alternative HTML version deleted]]




More information about the R-help mailing list