0

I am doing some experiment to learn how SOM (Self Organizing Maps) works, I tried to apply the algorithm to Ionosphere datasets. and found out that the Code Plot model strangely behave (if applied more than 14 Variables).. Here is my snippets to test this:

library(kohonen)
library(mlbench) #Ionosphere dataset is loaded from here

data(Ionosphere)
instance_data = Ionosphere

#====================================== Applying 5 Variable ======================================
data_train_matrix <- as.matrix(instance_data[,3:7])
som_grid <- somgrid(xdim = 5, ydim=5, topo="hexagonal")
som_model <- som(data_train_matrix, grid=som_grid, 
                 rlen=500, alpha=c(0.1,0.01), 
                 keep.data = TRUE)
plot(som_model, type="codes")

5 Variable Applied

#========================================= 10 Columns ==============================================
data_train_matrix <- as.matrix(instance_data[,3:12])
som_grid <- somgrid(xdim = 5, ydim=5, topo="hexagonal")
som_model <- som(data_train_matrix, grid=som_grid, 
                 rlen=500, alpha=c(0.1,0.01), 
                 keep.data = TRUE)
plot(som_model, type="codes")

10 Variable Applied

#========================================= 14 Variable ==============================================
data_train_matrix <- as.matrix(instance_data[,5:18])
som_grid <- somgrid(xdim = 5, ydim=5, topo="hexagonal")
som_model <- som(data_train_matrix, grid=som_grid, 
                 rlen=500, alpha=c(0.1,0.01), 
                 keep.data = TRUE)
plot(som_model, type="codes")

14 Variable Applied

#========================================= 15 Variable ==============================================
data_train_matrix <- as.matrix(instance_data[,5:19])
length_col = length(colnames(data_train_matrix))
som_grid <- somgrid(xdim = 5, ydim=5, topo="hexagonal")
som_model <- som(data_train_matrix, grid=som_grid, 
                 rlen=500, alpha=c(0.1,0.01), 
                 keep.data = TRUE)
plot(som_model, type="codes")

15 Variable Applied

I wanted to know what does this mean in plot code? my thought when seeing this:

1) does this conclude that SOM Models doesn't support for plotting many variables at once?

2) or are there any kinds of meaning from the last plot graph?

3) also, is it safe to continue analysis with SOM if plot codes occured like the last graph?

Please help for some feedback, Thank You for your kinds support :)

Jovan
  • 763
  • 7
  • 26
  • If you check the original article of the package (Self- and Super-organizing Maps in R), you can find the answer for the 1st and 2nd question, I think. On page 14, the authors said, "For large numbers of variables, the default behavior is to make a line plot rather than a segment plot...". – jazzurro Mar 04 '20 at 10:43
  • @jazzurro thank you for pointing, I have found the statement from the manual documentation :) – Jovan Mar 04 '20 at 15:33
  • You are welcome! – jazzurro Mar 04 '20 at 16:22

0 Answers0