Displaying 1 result from an estimated 1 matches for "classmat2classvec".
2010 Jun 02
1
how to label the som notes by the majority vote
...ing outcome as the class
variable.
set.seed(13)
final.xyf<- xyf(data=as.matrix(alex1[,c(1:256)]),
Y=classvec2classmat(alex1$outcome), xweight = 0.99, grid=somgrid(20, 30,
"hexagonal"))
outcome.xyf <- predict(final.xyf)$unit.prediction#get prediction
outcome.predict<- as.numeric(classmat2classvec(outcome.xyf)) #change matrix
to vectors.
outcome.label<-LETTERS[outcome.predict] #conver the numeric value to
letters.
plot(final.xyf, type="property", property=outcome.predict,
labels=outcome.label, palette.name =rainbow, main="Prediction ")
cl <- colors()
bgcols &l...