# NOT RUN {
data(MSC)
X=MSC$X
Y=MSC$Y
# with a bootsPLS object
boot=bootsPLS(X=X,Y=Y,ncomp=3,many=5,kCV=5)
fit=fit.model(boot,ncomp=3)
# with a spls.constraint object and without CI
pred=prediction(fit,X.test=X)
lapply(pred$predicted.test,head)
# with a spls.constraint object and with CI
pred.CI=prediction(fit,X.test=X,CI=TRUE)
lapply(pred.CI$out.CI$CI$'comp.1',head)
lapply(pred.CI$out.CI$CI$'comp.2',head)
lapply(pred.CI$out.CI$CI$'comp.3',head)
# without a spls.constraint object. X,Y and signature are needed
# the results should be similar
#(not the same because of the random subsamplings,
# exactly the same if subsampling.matrix is an input)
signature=fit$data$signature
pred=prediction(X=X,Y=Y,signature=signature,X.test=X)
pred2=prediction(X=X,Y=Y,signature=signature,X.test=X,CI=TRUE)
lapply(pred2$out.CI$CI$'comp.1',head)
lapply(pred2$out.CI$CI$'comp.2',head)
lapply(pred2$out.CI$CI$'comp.3',head)
# }
Run the code above in your browser using DataLab