ppls.splines.cv {ppls}R Documentation

Cross-validation for penalized PLS based on Splines Transformations

Description

This function computes the nonlinear-regression model for penalized PLS based on B-Splines Transformations.

Usage

ppls.splines.cv(X, y, lambda, ncomp, degree, order, nknot, k, kernel)

Arguments

X A n x p matrix of input data.
y A numeric n-vector of responses.
lambda A numeric vector giving the (positive) candidate values for the parameter lambda determining the amount of penalization. Default value is 1.
ncomp The number of PLS components, default value is min(nrow(X)-1,ncol(Z)), where Z denotes the transformed data obtained from the function X2s.
degree The degree of the splines. Default value is 3.
order The order of the differences to be computed for the penalty term. Default value is 2.
nknot The number of knots. Default value is 20 for all variables.
k The number of splits in k-fold cross-validation. Default value is k=5.
kernel If kernel=TRUE, the kernelized version of penalized PLS is computed. Default value is kernel=FALSE.

Details

This function computes the cv-optimal nonlinear regression model with Penalized Partial Least Squares. In a nutshell, the algorithm works as follows. Starting with a generalized additive model for the columns of X, each additive component is expanded in terms of a generous amount of B-Splines basis functions. The basis functions are determined via their degree and nknot, the number of knots. In order to prevent overfitting, the additive model is estimated via penalized PLS, where the penalty term penalizes the differences of a specified order within each original variable. See Kraemer, Boulesteix, and Tutz (2007) for 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

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

penalized.pls,penalized.pls.cv

Examples

# this example does not make much sense, it only illustrates
# how to use the functions properly

X<-matrix(rnorm(100*5),ncol=5)
y<-sin(X[,1]) +X[,2]^2 + rnorm(100)
lambda<-c(0,1,10,100,1000)
cv.result<-ppls.splines.cv(X,y,ncomp=10,k=10,lambda=lambda)

[Package ppls version 1.0 Index]