0

I am trying to run SOM algorithm in R using Kohenen package. In this I have to define xdim, ydim dimension manually. Refer below code:

som_grid <- somgrid(xdim=5, ydim=6, topo="hexagonal")

som_model <- som(data_train_matrix, 
             grid=som_grid, 
             keep.data = TRUE)

My questions:

  1. Is there a method where it automatically selects dimensions based on data
  2. Can any explain logic behind this selection so that can we write function in R to identify dimensions automatically
halfer
  • 19,824
  • 17
  • 99
  • 186
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Aug 21 '17 at 10:18

1 Answers1

0

I'm not very well in R but I think that can help you:

#Consider a dummy xdim and ydim Data.
x<-c(seq(0,5,by=0.5))
y<-c(seq(0,6,by=0.5))

## Determine the sector starting and end points.
a<-rbind(1,2,3,4,5)
b<-rbind(1,2,3,4,5,6)

sectors<-cbind(a,b)

sectors

## See the table of the sector.
  • Thank you. We are trying to find xdim and ydim in Self organizing map algorithm as an input. I understood your point but we require some logic to automatically finding those dimensions. Thank you – Vinayak NV Aug 22 '17 at 12:03