I am visualizing the U-matrix generated using a Self Organizing Map codebook to (visually) identify regions of similarity in the data.

Although I would like to use SOM to identify clusters in unlabeled data, I am running it first with some labeled benchmark data sets to make sure that my implementation is bug free.

For Iris data set, I can see a clear demarcation between the classes suggesting that the implementation is correct. The classes have been re-labeled as 1,2,3. U-matrix for Iris data set

However, when I run the same code on another data set, I can see that SOM was able to map members of different classes together (all the 0s are together and 1s are together and there are two distinct regions), but there is no clear demarcation.U-matrix of the data set in question

How can I improve the U-matrix or SOM to produce a clear demarcation between the classes?


Is the number of predictor variables in your new dataset large? If so, Euclidean distance can be unreliable due to the curse of dimensionality. You might want to try reducing the dimension of your dataset using Principal Component Analysis or feature selection. Alternatively, you might want to try using a different distance metric, like the cosine similarity.

| improve this answer | |
  • 1
    $\begingroup$ As you can see, the patterns are well separated; the problem is with the visualization. The U-matrix is not showing any separation between the classes. $\endgroup$ – Rohit Gavval May 9 '18 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.