Compute and plot cross-validated mean squared prediction error for SPLS regression
Draw heatmap of v-fold cross-validated mean squared prediction error and return optimal eta (thresholding parameter) and K (number of hidden components).
cv.spls( x, y, fold=10, K, eta, kappa=0.5, select="pls2", fit="simpls", scale.x=TRUE, scale.y=FALSE, plot.it=TRUE )
x |
Matrix of predictors. |
y |
Vector or matrix of responses. |
fold |
Number of cross-validation folds. Default is 10-folds. |
K |
Number of hidden components. |
eta |
Thresholding parameter. |
kappa |
Parameter to control the effect of
the concavity of the objective function
and the closeness of original and surrogate direction vectors.
|
select |
PLS algorithm for variable selection.
Alternatives are |
fit |
PLS algorithm for model fitting. Alternatives are
|
scale.x |
Scale predictors by dividing each predictor variable by its sample standard deviation? |
scale.y |
Scale responses by dividing each response variable by its sample standard deviation? |
plot.it |
Draw heatmap of cross-validated mean squared prediction error? |
Invisibly returns a list with components:
mspemat |
Matrix of cross-validated mean squared prediction error.
Rows correspond to |
eta.opt |
Optimal |
K.opt |
Optimal |
Dongjun Chung, Hyonho Chun, and Sunduz Keles.
Chun H and Keles S (2010), "Sparse partial least squares for simultaneous dimension reduction and variable selection", Journal of the Royal Statistical Society - Series B, Vol. 72, pp. 3–25.
print.spls
, plot.spls
, predict.spls
,
and coef.spls
.
data(yeast) set.seed(1) # MSPE plot. eta is searched between 0.1 and 0.9 and # number of hidden components is searched between 1 and 10 ## Not run: cv <- cv.spls(yeast$x, yeast$y, K = c(1:10), eta = seq(0.1,0.9,0.1)) # Optimal eta and K cv$eta.opt cv$K.opt (spls(yeast$x, yeast$y, eta=cv$eta.opt, K=cv$K.opt)) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.