1

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.

  • Please compare the dimensions of `som_model$codes` and the values in `som_model$unit.classif`. You can `table(som_model$unit.classif)` or `unique(som_model$unit.classif)`. –  Jul 22 '14 at 10:16
  • Thank you for the reply @Pascal. I have already done that. My purpose is different. I intend to establish the exact functional form relating the 'som_model$classif' to each observation of the input data set 'train_matrix'. Let me try to explain it better with an example. Suppose we consider a grid of 10X10. The dimension for 'som_model$codes' would be 100. These 100 prototype vectors are then mapped using the algorithm to each element of the input data set train_matrix. Objective is to find why or how did say, train_matrix[2,3] get mapped to say 32 (as it is shown by 'som_model$unit.classif'. – Parth Khare Jul 25 '14 at 10:13
  • Are you speaking about the SOM algorithm itself? –  Jul 25 '14 at 10:17
  • In a way, but not the main part where the neurons are being trained. Instead, how are they mapped using finally trained weights . I'd figure this should not be too much in the black box part since one can access both the final codebook vectors($codes) and the indices($unit.classif) of the matches. – Parth Khare Jul 25 '14 at 10:56

0 Answers0