search for: datvars

Displaying 1 result from an estimated 1 matches for "datvars".

2013 Mar 02
2
caret pls model statistics
...iris[inTrain1,] testing1=iris[-inTrain1,] ctrl1=trainControl(method="cv", number=10) plsFit2=train(Species~., 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) summar...