Difference between revisions of "Caltransfer"

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Benjamin
imported>Benjamin
m
Line 51: Line 51:
  
 
*'''blockdetails''' : [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
 
*'''blockdetails''' : [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
:* ‘Compact’ - does not include x1 & x2 datasets in the model ('model.detail.data').
+
:* ‘Compact’ = does not include x1 & x2 datasets in the model ('model.detail.data').
:* ‘Standard’ - use the default blockdetails setting for this model: ‘Compact’.
+
:* ‘Standard’ = use the default blockdetails setting for this model: ‘Compact’.
:* 'All' include both x1 & x2 datasets in the model.
+
:* 'All' = include both x1 & x2 datasets in the model.
  
 
*'''preprocessing''' : {[] []} Preprocessing structures for instrument 1 and instrument 2 x-blocks (see PREPROCESS). Note that it is usual in PLS_Toolbox for the preprocessing{2} structure to hold the Y-block preprocessing. But caltransfer does not use a Y-block so instead preprocessing{2} is used to hold the Instrument 2 X-block preprocessing.
 
*'''preprocessing''' : {[] []} Preprocessing structures for instrument 1 and instrument 2 x-blocks (see PREPROCESS). Note that it is usual in PLS_Toolbox for the preprocessing{2} structure to hold the Y-block preprocessing. But caltransfer does not use a Y-block so instead preprocessing{2} is used to hold the Instrument 2 X-block preprocessing.

Revision as of 10:08, 27 July 2017

Purpose

Create or apply calibration and instrument transfer models.

Synopsis

[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,options)
x2t = caltransfer(x2,transfermodel,options)
[transfermodel,x1t,{x2t_1 x2t_2 x2t_3}] = caltransfer(x1,{{x2_1 x2_2 x2_3},method,options)
{x2t_1 x2t_2 x2t_3} = caltransfer({x2_1 x2_2 x2_3},transfermodel,options)

Description

CALTRANSFER uses one of the several transfer functions (methods) available in PLS_Toolbox to return a model and transformed data. The exact I/O is dictated by the transfer function (method) used.

Inputs

x1 = (2-way array class "double" or "dataset") calibration data (e.g., spectra from the standard instrument).
x2 = (2-way array class "double" or "dataset") data to be transformed (e.g., spectra from the instrument to be standardized).
method = (string) indicating which calibration transfer function (method) to use.
Choices are:
ds : Direct Standardization
pds : Piecewise Direct Standardization
dwpds : Double Window Piecewise Direct Standardization
glsw : Generalized Least-Squares Weighting
osc : Orthogonal Signal Correction
alignmat : Matrix Alignment

Outputs

transfermodel = standard model structure containing the Calibration Transfervmodel (See Standard Model Structure).
x1t = Calibration data returned. Depending on the type of calibration function (method) used this may or may not be transformed from the input data (x1).
x2t = Transformed data.

Options

options = structure array with the following fields:

  • display : [ 'off' | {'on'} ] governs level of display to command window.
  • blockdetails : [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
  • ‘Compact’ = does not include x1 & x2 datasets in the model ('model.detail.data').
  • ‘Standard’ = use the default blockdetails setting for this model: ‘Compact’.
  • 'All' = include both x1 & x2 datasets in the model.
  • preprocessing : {[] []} Preprocessing structures for instrument 1 and instrument 2 x-blocks (see PREPROCESS). Note that it is usual in PLS_Toolbox for the preprocessing{2} structure to hold the Y-block preprocessing. But caltransfer does not use a Y-block so instead preprocessing{2} is used to hold the Instrument 2 X-block preprocessing.

NOTE: There are sub-structures for each 'method'. These sub structures include both the input parameters (any additional inputs needed by the function) as well as optional inputs (the options structure for that particular function). For more information on inputs to each method see the help for that function (e.g., help stdgen). Examples of using the substructures:

Example

OSC requires a y-block in addition to (x1) and (x2). The y-block should be assigned via the options structure:

opts.osc.y = yblock;


To assign window widths for DWPDS:

options.dwpds.win = [5 3];


See Also

alignmat, glsw, oscapp, osccalc, stdgen, stdize