Cls: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Donal
 
(14 intermediate revisions by 5 users not shown)
Line 4: Line 4:


===Synopsis===
===Synopsis===
 
: model = cls(x,options);          %identifies model (calibration step)
: model = cls(x,options);          %identifies model (calibration step)
: model = cls(x,y,options);        %identifies model (calibration step)
: model = cls(x,y,options);        %identifies model (calibration step)
: pred  = cls(x,model,options);    %makes predictions with a new X-block
: pred  = cls(x,model,options);    %makes predictions with a new X-block
: valid = cls(x,y,model,options);  %makes predictions with new X- & Y-block
: valid = cls(x,y,model,options);  %makes predictions with new X- & Y-block
: cls  % Launches the Analysis window with CLS as the selected method.
Please note that the recommended way to build and apply a CLS model from the command line is to use the Model Object. Please see [[EVRIModel_Objects | this wiki page on building and applying models using the Model Object]].


===Description===
===Description===
Line 22: Line 25:


====Outputs====
====Outputs====
* '''model''' = standard model structure containing the CLS model (See MODELSTRUCT).
* '''model''' = standard model structure containing the CLS model (See [[Standard Model Structure]]).
* '''pred''' = structure array with predictions.
* '''pred''' = structure array with predictions.
* '''valid''' = structure array with predictions.
* '''valid''' = structure array with predictions.
Line 31: Line 34:


* '''plots''': [ {'none'} | 'final' ] governs plotting of results.
* '''plots''': [ {'none'} | 'final' ] governs plotting of results.
* '''order''': positive integer for polynomial order {default = 1}.
* '''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.
Line 45: Line 47:


* '''confidencelimit''': [{0.95}] Confidence level for Q and T2 limits. A value of zero (0) disables calculation of confidence limits.
* '''confidencelimit''': [{0.95}] Confidence level for Q and T2 limits. A value of zero (0) disables calculation of confidence limits.
* '''blockdetails''': [ 'compact' | {'standard'} | 'all' ]   Extent of predictions and raw residuals included in model. 'standard' = only y-block, 'all' x and y blocks.
* '''blockdetails''': [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
:* ‘Standard’ = the predictions and raw residuals for the X-block as well as the X-block itself are not stored in the model to reduce its size in memory. Specifically, these fields in the model object are left empty: 'model.pred{1}', 'model.detail.res{1}', 'model.detail.data{1}'.
:* ‘Compact’ = for this function, 'compact' is identical to 'standard'.
:* 'All' = keep predictions, raw residuals for both X- & Y-blocks as well as the X- & Y-blocks themselves.


===See Also===
===See Also===


[[analysis]], [[pcr]], [[pls]], [[preprocess]], [[stepwise regrcls]]
[[analysis]], [[clsti]], [[pcr]], [[pls]], [[preprocess]], [[stepwise regrcls]], [[testrobustness]], [[EVRIModel_Objects]]

Latest revision as of 10:57, 8 December 2023

Purpose

Classical Least Squares regression for multivariate Y.

Synopsis

model = cls(x,options); %identifies model (calibration step)
model = cls(x,y,options); %identifies model (calibration step)
pred = cls(x,model,options); %makes predictions with a new X-block
valid = cls(x,y,model,options); %makes predictions with new X- & Y-block
cls  % Launches the Analysis window with CLS as the selected method.

Please note that the recommended way to build and apply a CLS model from the command line is to use the Model Object. Please see this wiki page on building and applying models using the Model Object.

Description

CLS identifies models of the form y = Xb + e.

Inputs

  • x = X-block: predictor block (2-way array or DataSet Object).

Optional Inputs

  • y = Y-block: predicted block (2-way array or DataSet Object). The number of columns of y indicates the number of components in the model (each row specifies the mixture present in the given sample). If y is omitted, x is assumed to be a set of pure component responses (e.g. spectra) defining the model itself.

Outputs

  • model = standard model structure containing the CLS model (See Standard Model Structure).
  • pred = structure array with predictions.
  • valid = structure array with predictions.

Options

options = a structure array with the following fields:

  • plots: [ {'none'} | 'final' ] governs plotting of results.
  • display: [ 'off' | {'on'} ] governs level of display to command window.
  • plots: [ 'none' | {'final'} ] governs level of plotting.
  • preprocessing: { [] [] } preprocessing structure (see PREPROCESS).
  • algorithm: [ {'ls'} | 'nnls' | 'snnls' | 'cnnls' | 'stepwise' | 'stepwisennls' ] Specifies the regression algorithm.
Options are:
ls = a standard least-squares fit.
snnls = non-negative least squares on spectra (S) only.
cnnls = non-negative least squares on concentrations (C) only.
nnls = non-negative least squares fit on both C and S.
stepwise = stepwise least squares
stepwisennls = stepwise non-negative least squares
  • confidencelimit: [{0.95}] Confidence level for Q and T2 limits. A value of zero (0) disables calculation of confidence limits.
  • blockdetails: [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
  • ‘Standard’ = the predictions and raw residuals for the X-block as well as the X-block itself are not stored in the model to reduce its size in memory. Specifically, these fields in the model object are left empty: 'model.pred{1}', 'model.detail.res{1}', 'model.detail.data{1}'.
  • ‘Compact’ = for this function, 'compact' is identical to 'standard'.
  • 'All' = keep predictions, raw residuals for both X- & Y-blocks as well as the X- & Y-blocks themselves.

See Also

analysis, clsti, pcr, pls, preprocess, stepwise regrcls, testrobustness, EVRIModel_Objects