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:
- Is there a method where it automatically selects dimensions based on data
- Can any explain logic behind this selection so that can we write function in R to identify dimensions automatically