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:
- 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).
- How can I save the SOM and test it on the new dataset?