pls.regression.cv {plsgenomics} | R Documentation |
Determination of the number of latent components to be used in PLS regression
Description
The function pls.regression.cv
determines the best number of latent components to be used
for PLS regression using the cross-validation approach described in Boulesteix and Strimmer (2005).
Usage
pls.regression.cv(Xtrain, Ytrain, ncomp, nruncv=20, alpha=2/3)
Arguments
Xtrain |
a (ntrain x p) data matrix containing the predictors for the training data set.
|
Ytrain |
a (ntrain x m) data matrix of responses. |
ncomp |
the vector of integers from which the best number of latent
components has to be chosen by cross-validation. If |
nruncv |
the number of cross-validation iterations to be performed for the choice of the number of latent components. |
alpha |
the proportion of observations to be included in the training set at each cross-validation iteration. |
Details
The cross-validation procedure described in Boulesteix and Strimmer (2005)
is used to determine the best number of latent components to be used for classification.
At each cross-validation run, Xtrain
is split into a pseudo training
set and a pseudo test set and the squared error is determined for each
number of latent components. Finally, the function pls.regression.cv
returns
the number of latent components for which the mean squared error over
the nrun
partitions is minimal.
Value
The number of latent components to be used in PLS regression, as determined by cross-validation.
Author(s)
Anne-Laure Boulesteix (https://www.ibe.med.uni-muenchen.de/mitarbeiter/professoren/boulesteix/index.html) and Korbinian Strimmer (https://strimmerlab.github.io/korbinian.html).
References
A. L. Boulesteix and K. Strimmer (2005). Predicting Transcription Factor Activities from Combined Analysis of Microarray and ChIP Data: A Partial Least Squares Approach.
A. L. Boulesteix, K. Strimmer (2007). Partial least squares: a versatile tool for the analysis of high-dimensional genomic data. Briefings in Bioinformatics 7:32-44.
S. de Jong (1993). SIMPLS: an alternative approach to partial least squares regression, Chemometrics Intell. Lab. Syst. 18, 251–263.
See Also
pls.regression
, TFA.estimate
,
pls.lda.cv
.
Examples
## Not run:
## between 5~15 seconds
# load plsgenomics library
library(plsgenomics)
# load Ecoli data
data(Ecoli)
# determine the best number of components for PLS regression using the cross-validation approach
# choose the best number from 1,2,3,4
pls.regression.cv(Xtrain=Ecoli$CONNECdata,Ytrain=Ecoli$GEdata,ncomp=4,nruncv=20)
# choose the best number from 2,3
pls.regression.cv(Xtrain=Ecoli$CONNECdata,Ytrain=Ecoli$GEdata,ncomp=c(2,3),nruncv=20)
## End(Not run)