Crcvrnd: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
No edit summary
Line 1: Line 1:
===Purpose===
===Purpose===


Line 6: Line 5:
===Synopsis===
===Synopsis===


:[press,fiterr,mlvp,b] = crcvrnd(x,y,splt,itr,lv,pwrs,''ss'',''mc'')
:[press,fiterr,minlvp,b] = crcvrnd(x,y,splt,itr,lv,powers,''ss'',''mc'')


===Description===
===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.
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 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 (minlvp) 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.
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.
A good smooth PRESS surface can usually 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===
===See Also===


[[cr]], [[pcr]], [[pls]]
[[cr]], [[pcr]], [[pls]]

Revision as of 11:50, 22 February 2013

Purpose

Cross-validation for continuum regression models using SDEP.

Synopsis

[press,fiterr,minlvp,b] = crcvrnd(x,y,splt,itr,lv,powers,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 (minlvp) 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 usually 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, pcr, pls