1

This is my first post and I am newbie in R. I'm trying to train a Self-Organizing Map. My data is a matrix of 2304 instances with 7 features each instance ([2304x7])

Following the example codes with (like wines' dataset) I have no problem but when I try to modify some features with my data I have this error:

Error in som(datos, grid = som_grid, init = "random", alpha = c(1, 0.1), : unused arguments (alphaType = "linear", neigh = "gaussian")

I am just typing code below:

library(kohonen)

som_grid<-somgrid(xdim=8, ydim=3,topo="hexagonal")

som_model <- som(my_data, grid=som_grid, init="random", alpha=c(1.0, 0.1), alphaType="linear", neigh="gaussian",r adius=c(15,3), rlen=c(100,1000))

What am i doing wrong?

Thank you so much and sorry it is answered already (I didn't find it)!

Jobins John
  • 1,265
  • 23
  • 45
JP Manzano
  • 11
  • 5
  • I saw that the example codes have: set.seed(7) before the training but I don't understand what it does. – JP Manzano Sep 05 '17 at 12:03
  • set.seed(some number) lets you get the same result each time when there is a randomization step. Without it, your returned values will vary each time – lawyeR Sep 05 '17 at 12:27
  • `alphaType` and `neigh` are options of the `som` command in the `som` package, not in the `kohonen` package. – Marco Sandri Sep 05 '17 at 13:29
  • Thanks @lawyeR! But I don't understand it completely...what do you mean with the same values? It is not logical to obtain different results after different random initializations? – JP Manzano Sep 05 '17 at 13:59
  • Cool! Now it works (or at least I don't have errors with som training). Thank you @MarcoSandri. – JP Manzano Sep 05 '17 at 14:00

1 Answers1

0

Rlen argument accepts a single value, i.e. in your code it should be rlen=100 (default) or rlen=1000

qdread
  • 3,389
  • 19
  • 36
AR2018
  • 1