Difference between revisions of "Caltransfer"

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Scott
(See Also)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
 
===Purpose===
 
===Purpose===
  
Line 6: Line 5:
 
===Synopsis===
 
===Synopsis===
  
:[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,options)
+
:[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,''options'')
 
+
:x2t = caltransfer(x2,transfermodel,''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'')
:[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===
 
===Description===
Line 22: Line 14:
 
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.
 
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====
+
====Inputs====
  
* '''x1''' = (2-way array class "double" or "dataset") calibration data (e.g., spectra from the standard instrument).  
+
: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).
+
: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.
+
:method = (string) indicating which calibration transfer function (method) to use.
  
*  '''Choices''' are:
+
::Choices are:
  
*  ''''ds'''' : Direct Standardization
+
::ds : Direct Standardization
  
*  ''''pds'''' : Piecewise Direct Standardization
+
::pds : Piecewise Direct Standardization
  
*  ''''dwpds'''' : Double Window Piecewise Direct Standardization
+
::dwpds : Double Window Piecewise Direct Standardization
  
*  ''''glsw'''' : Generalized Least-Squares Weighting
+
::glsw : Generalized Least-Squares Weighting
  
*  ''''osc'''' : Orthogonal Signal Correction
+
::osc : Orthogonal Signal Correction
  
*  ''''alignmat'''' : Matrix Alignment
+
::alignmat : Matrix Alignment
  
====OUTPUTS====
+
====Outputs====
  
* '''transfermodel''' = standard model structure containing the Calibration Transfervmodel (See MODELSTRUCT).
+
: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).
+
: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.
+
:x2t = Transformed data.
  
 
===Options===
 
===Options===
  
* '''options'''  = structure array with the following fields:
+
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.
 +
:* ‘Standard’ = does not include x1 & x2 datasets in the model ('model.detail.data').
 +
:* ‘Compact’ = for this function, 'compact' is identical to 'standard'.
 +
:* 'All' = include both x1 & x2 datasets in the model.
  
* '''display''' : [ 'off' | {'on'} ] governs level of display to command window.
+
*'''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.
  
* '''blockdetails''' : [ 'compact' | {'standard'} | 'all' ] extent of data included in model. 'standard' = none, 'all' x-block.
+
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:
  
* '''preprocessing''' : {[] []} Preprocessing structures for x and y blocks (see PREPROCESS).
+
===Example===
  
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:
+
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;
  
**''''''''''''''' 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:
  
* '''Example''': To assign window widths for DWPDS:
+
:options.dwpds.win = [5 3];
  
*  '''options.dwpds.win''' = [5 3];
 
  
 
===See Also===
 
===See Also===
  
[[alignmat]], [[glsw]], [[oscapp]], [[osccalc]], [[stdgen]], [[stdize]]
+
[[alignmat]], [[calcdifference]], [[glsw]], [[oscapp]], [[osccalc]], [[stdgen]], [[stdize]], [[nlstd]]

Latest revision as of 10:51, 30 August 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.
  • ‘Standard’ = does not include x1 & x2 datasets in the model ('model.detail.data').
  • ‘Compact’ = for this function, 'compact' is identical to 'standard'.
  • '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, calcdifference, glsw, oscapp, osccalc, stdgen, stdize, nlstd