PLS_Toolbox Documentation: crcvrnd | < cr | crosscor > |
crcvrnd
Purpose
Cross-validation for continuum regression models using SDEP.
Synopsis
[press,fiterr,mlvp,b] = crcvrnd(x,y,splt,itr,lv,pwrs,ss,mc)
Description
crcvrnd is used to cross-validate continuum regression models given a matrix of predictor variables (x-block) x, matrix or vector of predicted variables (y-block) y, the number of divisions into which to split the data splt, the number of iterations of the cross-validation procedure using different re-orderings of the data set itr, maximum number of latent variables lv and the row vector of continuum regression parameters to consider powers.
The outputs are the predictive residual error sum of squares (PRESS) matrix press where each element of the matrix represents the PRESS for a given combination of LVs and continuum parameter, the corresponding fit error fiterr, the number of LVs and power at minimum PRESS mlvp and the final regression vector or matrix b.
The optional input ss causes the routine to choose contiguous blocks of data during cross-validation when set to 1. If the optional input mc is set to 0 the subsets are not mean-centered during cross-validation.
A good smooth PRESS surface can usuall be obtained by calculating about 20 models spaced logarithmically between 4 and 1/4 and using 10 to 30 iterations of the cross-validation. A good rule of thumb for dividing the data is to use either the square root of the number of samples or 10, which ever is smaller.
See Also
< cr | crosscor > |