penalized.pls.cv {ppls}R Documentation

Cross-validation for penalized PLS

Description

Computes the cross-validated error of penalized PLS for different values of lambda and components, and returns the parameter values and coefficients for the optimal model.

Usage

penalized.pls.cv(X, y, P, lambda, ncomp, k, kernel,scale)

Arguments

X matrix of input data
y vector of responses
P Penalty matrix. For the default value P=NULL, no penalty term is used, i.e. ordinary PLS is computed.
lambda vector of candidate parameters lambda for the amount of penalization. Default value is 1
ncomp Number of penalized PLS components to be computed. Default value is min(nrow(X)-1,ncol(X))
k the number of splits in k-fold cross-validation. Default value is k=5.
kernel Logical value. If kernel=TRUE, the kernelized version of penalized PLS is computed. Default value is kernel=FALSE
scale logical value. I scale=TRUE, the X variables are standardized to have unit variance. Default value is FALSE

Details

Value

lambda.opt Optimal value of lambda
ncomp.opt Optimal number of penalized PLS components
min.ppls Cross-validated error for the optimal penalized PLS solution
intercept Intercept for the optimal model, computed on the whole data set
coefficients Regression coefficients for the optimal model, computed on the whole data set

Author(s)

Nicole Kraemer

References

N. Kraemer, A.-L. Boulesteix, G. Tutz (2007) "Penalized Partial Least Squares with Applications to B-Splines Transformations and Functional Data", preprint

available at http://ml.cs.tu-berlin.de/~nkraemer/publications.html

See Also

ppls.splines.cv,penalized.pls,new.penalized.pls

Examples

# the penalty term in this example does not make much
# sense
X<-matrix(rnorm(20*100),ncol=20)
y<-rnorm(rnorm(100))
P<-Penalty.matrix(m=20)
pen.pls<-penalized.pls.cv(X,y,lambda=c(0,1,10),P=P,ncomp=10,kernel=FALSE)

[Package ppls version 1.01 Index]