Hi!

Some sample data could help us to help you...

But have you read '?xyf' in order to ensure that your 'Y' is what 'xyf' expects it to be?

What kind of error messages do you get?

Regards,
Kimmo

16.06.2016, 15:13, ch.elahe via R-help wrote:
Is there any answer?


Hi all, I have a df and I want to use supervised Self Organizing Map
to do classification. I should use Kohonen library and xyf function
from it. As you know the xyf function looks like this and I have
problem defining my Y:

xyf(data,Y,grid=somgrid(),rlen=100,alpha=c(0.05,0.01)) I want to do
classification based on a column which shows the speed that a
protocols is run, and this column is the following:

$speed   :num 4 4 3 3 3 1 1 1 2 1 4 4 3 numbers from 1 to 4 show the
speed from very fast to very slow protocols. so the property I want
to be modeled is df$speed, but I don't know how should I bring it in
xyf function. Does anyone know how to do that? I also added my train
set ans test set:

dt=sort(sample(nrow(df),nrow(df)*.7)) train=df[dt,]
Xtraining=scale(trian) Xtest=scale(-trian)
center=attr(Xtrianing,"scaled:center")
scale=attr(Xtraining,"scaled:scale")
xyf(Xtraining,........,grid=somgrid(10,10,"hexagonal"))


Thanks for any Help, Elahe

______________________________________________ R-help@r-project.org
mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
posting guide http://www.R-project.org/posting-guide.html and provide
commented, minimal, self-contained, reproducible code.

______________________________________________ R-help@r-project.org
mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the
posting guide http://www.R-project.org/posting-guide.html and provide
commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to