Skip to content
Prev 361927 / 398506 Next

Y in Kohonen xyf function

Hi again!
21.06.2016, 21:33, chalabi.elahe at yahoo.de wrote:
Sorry, my mistake, should habe been 'df$speed'. Please try the following:

--- snip ---

set.seed(7) training <- sample(nrow(df), 120)
Xtraining<- scale(df[training,])
Xtest <- scale(df[-training,], center = attr(Xtraining, 
"scaled:center"), scale = attr(Xtraining,
"scaled:scale"))
xyf.df <- xyf(Xtraining, factor(df$speed[training]), grid =
somgrid(5, 5, "hexagonal"))

--- snip ---

HTH,
Kimmo