2

I am trying to cluster large amount of data with SOM in R programming. The sample code is here :

> library("kohonen")
> data("wines")
> wines.sc <- scale(wines)
> set.seed(7)
> wine.som <- som(data = wines.sc, grid = somgrid(5, 4, "hexagonal"))
> plot(wine.som, main = "Wine data")

Now I have two questions:

  1. How can I extract the bin properties to find out each row of data belongs to which bin? (for example, I want to know each wine data row belongs to which bin).
  2. How can I save the SOM and test it on the new dataset?
Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
Amir
  • 625
  • 1
  • 11
  • 26

0 Answers0