Re: [R] how to label the som notes by the majority vote

2010-06-02 Thread Joris Meys
Hi Changbin, I looked at your code again, and it appears as if you're using the mapping plot for something that it isn't meant for. The mapping shows you how many points you have in every circle, and these points are represented by the labels. Your first plot gives the majority vote. This said,

Re: [R] how to label the som notes by the majority vote

2010-06-02 Thread Changbin Du
Thanks, Joris! It works! I appreciated! On Wed, Jun 2, 2010 at 4:23 AM, Joris Meys jorism...@gmail.com wrote: Hi Changbin, I looked at your code again, and it appears as if you're using the mapping plot for something that it isn't meant for. The mapping shows you how many points you have

Re: [R] how to label the som notes by the majority vote

2010-06-01 Thread Joris Meys
Dear Changbin, Please provide a self-contained, minimal example, meaning the whole code should run and create the plot as it is now, without having to load your dataset (which we don't have). Otherwise it's impossible to see what's going on and help you. Cheers Joris On Wed, Jun 2, 2010 at 2:21

Re: [R] how to label the som notes by the majority vote

2010-06-01 Thread Changbin Du
library(kohonen) data(nir) attach(nir) #SOM, the supervised learning, train the map using temperature as the class variable. set.seed(13) nir.xyf- xyf(data=spectra, Y=classvec2classmat(temperature), xweight = 0.9, grid=somgrid(4, 4, hexagonal)) temp.xyf - predict(nir.xyf)$unit.prediction #get