[R] Y in Kohonen xyf function
chalabi.elahe at yahoo.de
chalabi.elahe at yahoo.de
Thu Jun 16 16:30:16 CEST 2016
Hi Kimmo,
Thanks for your reply, Here is a part of my df:
'data.frame': 562 obs. of 128 variables
$ TE :int 37 37 35 34 37 37 35 33 32 ...
$ TR :int 11 11 8 13 11 8 15 12 8 .....
$ BW :int 150 191 128 145 200 191 ........
$speed :int 4 4 3 3 2 1 4 1 2 3 ..........
and I want to cluster my data based on speed, to see the coming costumer's protocols fall into which speed group and I think I need to bring this speed column in Y element of xyf
On Thursday, June 16, 2016 2:29 PM, K. Elo <maillists at pp.inet.fi> wrote:
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 at 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 at 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 at 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.
More information about the R-help
mailing list