# NOT RUN {
data(prostate)
set.seed(1)
# misclassification rate plot. eta is searched between 0.1 and 0.9 and
# number of hidden components is searched between 1 and 5
# }
# NOT RUN {
cv <- cv.sgpls(prostate$x, prostate$y, K = c(1:5), eta = seq(0.1,0.9,0.1),
scale.x=FALSE, fold=5)
# }
# NOT RUN {
# }
# NOT RUN {
(sgpls(prostate$x, prostate$y, eta=cv$eta.opt, K=cv$K.opt, scale.x=FALSE))
# }
Run the code above in your browser using DataLab