Search code examples
rmachine-learningcluster-analysissomunsupervised-learning

Self organising map visualisation result interpretation


Using the R Kohonen package, I have obtained a "codes" plot which shows the codebook vectors.

codes plot

I would like to ask, shouldn't the codebook vectors of neighbouring nodes be similar? Why are the top 2 nodes on the left so different?

Is there a way to organise it in a meaningful organisation such as this image below? Source from here. Where the countries of high poverty are clustered at the bottom. world poverty map

library("kohonen")

data("wines")
wines.sc <- scale(wines)
set.seed(7)
wine.som <- som(data = wines.sc, grid = somgrid(5, 4, "hexagonal"))

# types of plots

plot(wine.som, type="codes", main = "Wine data")

Solution

  • Map 1 is the average vector result for each node. The top 2 nodes that you highlighted are very similar.

    Map 2 is a kind of similarity index between the nodes.

    If you want to obtain such kind of map using the map 1 result you may have to develop your own plotting function with the following parameters:

    1. Pick up the most relevant nodes or the most different ones (manually or automatically). Then, you have to attribute a color to each of these nodes.

    2. Give a color the the neigbours nodes using the average distance between the center of each node from the selected nodes. Shorter distance = close color, higher distance = fading color.

    To sum up, that's a lot of work for nearly nothing. Map 1 is better and contains a lot of informations. Map 2 is nice looking...