search for: classvec2classmat

Displaying 3 results from an estimated 3 matches for "classvec2classmat".

2013 Mar 02
2
caret pls model statistics
...ies~., data=training1, method="pls", trControl=ctrl1, metric="Rsquared", preProc=c("scale")) data(iris) training1=iris[inTrain1,] datvars=training1[,1:4] dat.sc=scale(datvars) n=nrow(dat.sc) dat.indices=seq(1,n) timematrix=with(training1, classvec2classmat(Species[dat.indices])) pls.dat=plsr(timematrix ~ dat.sc, ncomp=3, method="oscorespls", data=training1) x=crossval(pls.dat, segments=10) summary(x) summary(plsFit2) I see two different R2 values and I cannot figure out how to get the Q2 value. Any insight as to what my errors may...
2010 Jun 02
1
how to label the som notes by the majority vote
...1$Label) alex1$outcome<-as.numeric(alex1$Label) alex1$outcome[1:20] #self-organizing maps(unsupervised learning) library("kohonen") #SOM, the supervised learning, train the map using 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 numer...
2010 Apr 06
2
help in function in R akin to macro in SAS
Dear Whom it may concern, I need help to figure the "macro" function in R: I need to plot the different data sets by a plotxyf function, I want the title to be different for different data set. # get the data set final.xyf<- xyf(data=as.matrix(my.final), Y=classvec2classmat(final$outcome), xweight = 0.5, grid=somgrid(5, 4, "hexagonal")) #plot function plotxyf<-function (data) { plot(data, type="mapping", labels=final$target, col=final$outcome+1,, main="Supervised: Mapping plot for data") } #u...