search for: mypl

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

Did you mean: mpl
2007 Oct 23
1
Compute R2 and Q2 in PLS with pls.pcr package
...nd R2 parameters are given for each variable of Y). I have tried to compute it myself from the ouput of mvr but I am not sure if the values of Ypred within the validat slot are the predictions of each observation of Y when leave-one-out cross validation is applied. My code is as follows: > mypls <- mvr(Xtrain, Ytrain, method="SIMPLS", validation="CV", ncomp=1, niter=nrow(Ytrain)) > Xhat <- mypls$training$Xscores %*% t(mypls$training$Xload) > R2 <- 1-(sum((Xhat-Xtrain)^2)/sum(Xtrain^2)) > Q2 <- 1-(sum((Ytrain-mypls$validat$Ypred[,,1])^2)/sum(Ytr...