Mcr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
(Importing text file)
Line 1: Line 1:
===Purpose===
===Purpose===
Multivariate curve resolution with constraints.
Multivariate curve resolution with constraints.
===Synopsis===
===Synopsis===
:model = mcr(x,ncomp,''options'')    %calibrate  
:model = mcr(x,ncomp,''options'')    %calibrate  
:model = mcr(x,c0,''options'')      %calibrate with explict initial guess
:model = mcr(x,c0,''options'')      %calibrate with explict initial guess
:pred  = mcr(x,model,''options'')    %predict
:pred  = mcr(x,model,''options'')    %predict
:options = mcr('options')
:options = mcr('options')
===Description===
===Description===
MCR decomposes a matrix '''X''' as '''CS''' such that '''X''' = '''CS''' + '''E''' where '''E''' is minimized in a least squares sense. Inputs are the matrix to be decomposed x (size ''m'' by ''n''), and either the number of components to extract, ncomp, or the explict initial guess, c0. If c0 is size ''m'' by ''k'', where ''k'' is the number of factors, then it is assumed to be the initial guess for '''C'''. If c0 is size ''k'' by ''n'' then it is assumed to be the initial guess for '''S'''. If ''m''=''n'' then, c0 is assumed to be the initial guess for '''C'''. Optional input ''options'' is described below.
MCR decomposes a matrix '''X''' as '''CS''' such that '''X''' = '''CS''' + '''E''' where '''E''' is minimized in a least squares sense. Inputs are the matrix to be decomposed x (size ''m'' by ''n''), and either the number of components to extract, ncomp, or the explict initial guess, c0. If c0 is size ''m'' by ''k'', where ''k'' is the number of factors, then it is assumed to be the initial guess for '''C'''. If c0 is size ''k'' by ''n'' then it is assumed to be the initial guess for '''S'''. If ''m''=''n'' then, c0 is assumed to be the initial guess for '''C'''. Optional input ''options'' is described below.
The output, model, is a standard model structure. The estimated contributionss '''C '''are stored in model.loads{2} and the estimated spectra '''S '''in model.loads{1}. Sum-squared residuals for samples and variables can be found in model.ssqresiduals{1} and model.ssqresiduals{2}, respectively. See the PLS_Toolbox manual for more information on the MCR method and models.
The output, model, is a standard model structure. The estimated contributionss '''C '''are stored in model.loads{2} and the estimated spectra '''S '''in model.loads{1}. Sum-squared residuals for samples and variables can be found in model.ssqresiduals{1} and model.ssqresiduals{2}, respectively. See the PLS_Toolbox manual for more information on the MCR method and models.
MCR, by default, uses the alternating least squares (ALS) algorithm. For details on the ALS algorithm and constraints available in MCR, see the ALS reference page.
MCR, by default, uses the alternating least squares (ALS) algorithm. For details on the ALS algorithm and constraints available in MCR, see the ALS reference page.
When called with new data and a model structure, MCR performs a prediction (applies the model to the new data) returning the projection of the new data onto the previously recovered loadings (i.e. estimated spectra).
When called with new data and a model structure, MCR performs a prediction (applies the model to the new data) returning the projection of the new data onto the previously recovered loadings (i.e. estimated spectra).
===Options===
===Options===
* '''''options''''' = a structure array with the following fields:
* '''''options''''' = a structure array with the following fields:
* '''display''': [ 'off' | {'on'} ] governs level of display to command window.
* '''display''': [ 'off' | {'on'} ] governs level of display to command window.
* '''plots''': [ 'none' | {'final'} ]  governs level of plotting.
* '''plots''': [ 'none' | {'final'} ]  governs level of plotting.
* '''preprocessing''':  { [] } preprocessing to apply to x-block (see PREPROCESS).
* '''preprocessing''':  { [] } preprocessing to apply to x-block (see PREPROCESS).
* '''blockdetails''': [ 'compact' | {'standard'} | 'all' ]  Extent of predictions and raw residuals included in model. 'standard' = none, 'all' x-block.
* '''blockdetails''': [ 'compact' | {'standard'} | 'all' ]  Extent of predictions and raw residuals included in model. 'standard' = none, 'all' x-block.
* '''initmethod''': ['distslct'] initialization method.
* '''initmethod''': ['distslct'] initialization method.
* '''initmode''': [1 | 2] mode of x for automatic initialization.  
* '''initmode''': [1 | 2] mode of x for automatic initialization.  
* '''confidencelimit''': [{0.95}] Confidence level for Q limits.  
* '''confidencelimit''': [{0.95}] Confidence level for Q limits.  
* '''alsoptions''': ['options'] options passed to ALS subroutine (see ALS).
* '''alsoptions''': ['options'] options passed to ALS subroutine (see ALS).
The default options can be retreived using: options = mcr('options');.
The default options can be retreived using: options = mcr('options');.
===See Also===
===See Also===
[[als]], [[analysis]], [[evolvfa]], [[ewfa]], [[fastnnls]], [[mlpca]], [[parafac]], [[plotloads]], [[preprocess]]
[[als]], [[analysis]], [[evolvfa]], [[ewfa]], [[fastnnls]], [[mlpca]], [[parafac]], [[plotloads]], [[preprocess]]

Revision as of 15:25, 3 September 2008

Purpose

Multivariate curve resolution with constraints.

Synopsis

model = mcr(x,ncomp,options) %calibrate
model = mcr(x,c0,options) %calibrate with explict initial guess
pred = mcr(x,model,options) %predict
options = mcr('options')

Description

MCR decomposes a matrix X as CS such that X = CS + E where E is minimized in a least squares sense. Inputs are the matrix to be decomposed x (size m by n), and either the number of components to extract, ncomp, or the explict initial guess, c0. If c0 is size m by k, where k is the number of factors, then it is assumed to be the initial guess for C. If c0 is size k by n then it is assumed to be the initial guess for S. If m=n then, c0 is assumed to be the initial guess for C. Optional input options is described below.

The output, model, is a standard model structure. The estimated contributionss C are stored in model.loads{2} and the estimated spectra S in model.loads{1}. Sum-squared residuals for samples and variables can be found in model.ssqresiduals{1} and model.ssqresiduals{2}, respectively. See the PLS_Toolbox manual for more information on the MCR method and models.

MCR, by default, uses the alternating least squares (ALS) algorithm. For details on the ALS algorithm and constraints available in MCR, see the ALS reference page.

When called with new data and a model structure, MCR performs a prediction (applies the model to the new data) returning the projection of the new data onto the previously recovered loadings (i.e. estimated spectra).

Options

  • options = a structure array with the following fields:
  • display: [ 'off' | {'on'} ] governs level of display to command window.
  • plots: [ 'none' | {'final'} ] governs level of plotting.
  • preprocessing: { [] } preprocessing to apply to x-block (see PREPROCESS).
  • blockdetails: [ 'compact' | {'standard'} | 'all' ] Extent of predictions and raw residuals included in model. 'standard' = none, 'all' x-block.
  • initmethod: ['distslct'] initialization method.
  • initmode: [1 | 2] mode of x for automatic initialization.
  • confidencelimit: [{0.95}] Confidence level for Q limits.
  • alsoptions: ['options'] options passed to ALS subroutine (see ALS).

The default options can be retreived using: options = mcr('options');.

See Also

als, analysis, evolvfa, ewfa, fastnnls, mlpca, parafac, plotloads, preprocess