Code used:
system.time(som_model <- som(train_matrix,
grid=som_grid,
rlen= p,
alpha=c(0.05,0.001),
n.hood = "circular",
keep.data = TRUE ))
By my understanding, som_model$unit.classif
maps the indices of the winning neurons/BMU's to individual rows of the input data set.
Tried linking them with the final codebook /weighted vectors (som_model$codes
) but have not been able to establish a link.
Kindly guide me on what basis/rule or formula does the som
assign these indices to the data.