Cross Validation for Ensemble Sparse Partial Least Squares Regression
Source:R/cv.enspls.R
cv.enspls.Rd
K-fold cross validation for ensemble sparse partial least squares regression.
Arguments
- x
Predictor matrix.
- y
Response vector.
- nfolds
Number of cross-validation folds, default is
5
. Note that this is the CV folds for the ensemble sparse PLS model, not the individual sparse PLS models. To control the CV folds for single sparse PLS models, please use the argumentcvfolds
.- verbose
Shall we print out the progress of cross-validation?
- ...
Arguments to be passed to
enspls.fit
.
Value
A list containing:
ypred
- a matrix containing two columns: real y and predicted yresidual
- cross validation result (y.pred - y.real)RMSE
- RMSEMAE
- MAERsquare
- Rsquare
Note
To maximize the probablity that each observation can
be selected in the test set (thus the prediction uncertainty
can be measured), please try setting a large reptimes
.
See also
See enspls.fit
for ensemble sparse
partial least squares regressions.
Author
Nan Xiao <https://nanx.me>