self-organizing maps and order of samples

I've just started learning about self-organizing maps without much of a background in neural networks, so forgive me if this question seems trivial, but it seems that a SOM depends on which order the input training data points are fed into the SOM? So it's possible to obtain different visualizations for the same training data?

• – naught101 Dec 10 '13 at 4:32

Yes, it's possible. SOM chooses one of your training input points at random at each iteration of training, so the order of your training data set doesn't matter. But if you run SOM multiple times on the same data and with different random number seeds, you'll see different results.

For example, using R's kohonen package, the example for som is:

data(wines)
set.seed(7)

training <- sample(nrow(wines), 120)
Xtraining <- scale(wines[training, ])
Xtest <- scale(wines[-training, ],
center = attr(Xtraining, "scaled:center"),
scale = attr(Xtraining, "scaled:scale"))

som.wines <- som(Xtraining, grid = somgrid(5, 5, "hexagonal"))


Note the set.seed. If you run everything after set.seed multiple times, you get the same results. But remove the set.seed, or use a different value, and you'll get different -- though similar -- results.