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?
-
$\begingroup$ see also stats.stackexchange.com/questions/79149/… $\endgroup$– naught101Dec 10, 2013 at 4:32
1 Answer
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.