Splitcaltest: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
imported>Donal
Line 43: Line 43:


* '''nonion''': [ {3} ] onion: The number of 'external layers'
* '''nonion''': [ {3} ] onion: The number of 'external layers'
* '''loopfraction''': [{0.1}] onion: fraction of unassigned samples assigned per onion layer.


* '''fraction''': [ {0.66} ] fraction of data to be set as calibrations samples.
* '''fraction''': [ {0.66} ] fraction of data to be set as calibrations samples.
Line 49: Line 51:


* '''repidclass''': [{1}] The X-block classset used to identify sample replicates
* '''repidclass''': [{1}] The X-block classset used to identify sample replicates
* '''distmeasure''': [{'euclidean'} | 'mahalanobis'] Defines the type of distance measure to use for onion method. 'euclidean' does simple, non-scaled distance. 'mahalanobis' scales each direction by the covariance matrix (correcting for unusually small or large directions). Either method can be abbreviated with their single first letter 'e' or 'm'.


* '''nnt_maxdistance''': [{inf}] reducennsamples: Maximum allowed closest distance between samples. Sample thinning stops if the two closest samples are further away than this value.
* '''nnt_maxdistance''': [{inf}] reducennsamples: Maximum allowed closest distance between samples. Sample thinning stops if the two closest samples are further away than this value.

Revision as of 21:38, 9 June 2014

Purpose

Splits data into calibration and test sets.

Synopsis

z = splitcaltest(model,options); %identifies model (calibration step)
Also available in the Analysis interface via the data context menu

Description

The split is based on the scores from the input model. If a matrix or DataSet is passed in place of a model, it is assumed to contain the scores for the data. A randomization is used in the splitting process so no assumption about the data acquisition order is necessary. It is possible to specify the usereplicates option to keep replicated samples together during the splitting process.

If usereplicates option is enabled and repidclass option indicates which sample classset identifies replicated samples then the splitting will not separate replicated samples from each other. Replicates are first combined using classcenter before splitcaltest is applied to the class centered data. Replicates only contribute to the class centered result if they were not excluded in the input dataset or model. The results of splitting these combined samples are then mapped back to the original replicates, so replicates are never separated in the resulting calibration and test sets.

Inputs

  • model = standard model structure from a factor-based model OR a double or DataSet object containing the scores to analyze.

Outputs

  • z = a structure containing the class and classlookup table.

Options

options = structure array with the following fields :

  • plots: [ 'none' | {'final'} ] Governs level of plotting
  • algorithm: [ {'onion'} | 'kennardstone' 'reducennsamples' ] Algorithm used to select calibration samples.
'onion' selects samples on outside of data space, see distslct.
'kennardstone' selects samples uniformly over and on outside of data space using the Kennard-Stone method, see kennardstone.
'reducennsamples' selects a subset of samples by removing nearest neighbors, see reducennsamples. Results are similar to Kennard-Stone.
  • nonion: [ {3} ] onion: The number of 'external layers'
  • loopfraction: [{0.1}] onion: fraction of unassigned samples assigned per onion layer.
  • fraction: [ {0.66} ] fraction of data to be set as calibrations samples.
  • usereplicates: [{0} | 1] Keep replicates together (1) or not (0).
  • repidclass: [{1}] The X-block classset used to identify sample replicates
  • distmeasure: [{'euclidean'} | 'mahalanobis'] Defines the type of distance measure to use for onion method. 'euclidean' does simple, non-scaled distance. 'mahalanobis' scales each direction by the covariance matrix (correcting for unusually small or large directions). Either method can be abbreviated with their single first letter 'e' or 'm'.
  • nnt_maxdistance: [{inf}] reducennsamples: Maximum allowed closest distance between samples. Sample thinning stops if the two closest samples are further away than this value.
  • nnt_maxsamples: [{5000}] reducennsamples: Maximum number of samples which can be passed for down-sampling. More than this number will throw an error.

See Also

distslct, reducennsamples, crossval, pca, pcr, preprocess, classcenter.