Evrimodel and Faq how are error bars calculated regression model: Difference between pages

From Eigenvector Research Documentation Wiki
(Difference between pages)
Jump to navigation Jump to search
imported>Jeremy
 
imported>Lyle
No edit summary
 
Line 1: Line 1:
===purpose===
===Issue:===
Build an EVRI Model Object.


===Synopsis===
How are the error bars calculated for a regression model and can they be related to a confidence limit (confidence in the prediction)?


:model = evrimodel(modeltype); %creates a model object of type (modeltype)
===Possible Solutions:===
:model = evrimodel; %creates a generic model object


===Description===
The error bars reported for inverse least squares models (and from the [[Ils_esterror]] function) represent the estimation error for each prediction, see:


An [[EVRIModel_Objects|EVRIModel object]] is a generic object that contains a standard Eigenvector model object. The model can be either "empty" (uncalibrated), "calibrated", or "applied" (prediction on new data). The examples below show building and applying a model using the object's built-in methods.
Faber, N.M. and Bro, R., Chemomem. and Intell. Syst., 61, 133-149 (2002)


Model objects are also output from numerous PLS_Toolbox functions (in the calibrated or applied state.) The content of these models can be interrogated through the model properties (the object fields available depend on the model type and can be accessed through the "fieldnames" method).
They can be read as a standard deviation of the estimate. However because the underlying distribution is not clearly known (and is a matter of research), a confidence limit is not reported.  


The models can also be used through the standard methods as described below.


For details on how to work with the objects, the the [[EVRIModel Objects|EVRIModel Objects page]].
'''Still having problems? Please contact our helpdesk at [mailto:helpdesk@eigenvector.com helpdesk@eigenvector.com]'''


====Optional Input====
[[Category:FAQ]]
* '''modeltype''' = standard model object type to create. E.g. 'pls','pca'.
 
====Output====
* '''model''' = standard model object of type (modeltype)
 
====Examples====
* '''BUILD MODEL'''
  m = evrimodel('pls'); %creates an empty PLS model object
  m.x = x;              %assigns data to the X-block (predictor)
  m.y = y;              %assigns data to the Y-block (predictand)
  m.ncomp = ncomp;      %sets the number of components in the model
  m.options = options;  %assigns model options with a standard options structure
  m.calibrate;          %performs calibration method
 
* '''CROSS-VALIDATE MODEL'''
  m.crossvalidate(x,cvi)
 
* '''APPLY MODEL'''
  p = m.apply(data)
 
* '''PLOT CONTENTS'''
  m.plotscores
  m.plotloads
  m.ploteigen
 
===Properties===
The following properties can be modified through SETPLSPREF using
  setplspref('evrimodel','property',value)
The properties govern model method behavior and include the following:
====General options====
* '''noobject''': [ {false} | true ] Disables object use altogether.
* '''usecache''': [ {false} | true ] Governs use of model cache when models are calibrated or applied using object methods.
====Type and class testing options====
* '''stricttesting''': [ false | {true} ] Give warning/error when code tests a model by using "isstruct" or "isfield(...,'modeltype'). Best practices are to avoid these methods and use ismodel() instead. This option helps detect code where the poor practices are used.
* '''strictmodeltype''': [ false | {true} ] Give warning/error when a model type is changed to either an undefined model  type or from one model type to an incompatible model type.
* '''fatalalerts''': [ {false} | true ] Governs whether above tests give warnings (false) or throw errors (true).
====Display options====
These settings govern the command-line output for models.
* '''desc''': [ false | {true} ] Governs display of model summary details (same as model.info).
* '''contents''': [ {false} | true ] Governs display of model fields and summary of their contents (old format of display).
====Model application options====
* '''plots''': [ {'none'} | 'final' ] Governs showing of plots when model is calibrated or applied to new data.
* '''display''': [ {'off'} | 'on' ] Governs display of information at the command line when the model is calibrated or applied to new data.
* '''matchvars''': [ 'off' | {'on'} ] Governs use of variable alignment when apply the model to new data (matchvars). When
::When 'on', new data will be aligned to model before application.
::When 'off', if the new data variables do not match the model's expected variables, an error will be thrown.
* '''contributions''': [ {'passed'} | 'used' | 'full' ] Governs detail of returned T^2 and Q contributions. Return contributions for:
::'passed' = only the variables passed by the client in the order passed. This mode allows the client to easily map contributions back to passed data and is the preferred mode.
::'used'  = all variables used by the model including even variables which client did not provide. Variable order is that used by model and may not match the order passed by the client.
::'full'  = all variables used or excluded by the model, including even variables which client did not provide. Variable order is that used by model and may not match the order passed by the client.
* '''reducedstats''': [ {'off'} | 'on' ] Governs whether Q and T^2 statistics from models are "reduced" using the confidence limit set in the model.detail.reslim and model.detail.tsqlim fields.
::If 'on', statistics are normalized using the value stored in the appropriate detail sub-field.
::If 'off', statistics are returned as calculated.

Revision as of 12:07, 5 December 2018

Issue:

How are the error bars calculated for a regression model and can they be related to a confidence limit (confidence in the prediction)?

Possible Solutions:

The error bars reported for inverse least squares models (and from the Ils_esterror function) represent the estimation error for each prediction, see:

Faber, N.M. and Bro, R., Chemomem. and Intell. Syst., 61, 133-149 (2002)

They can be read as a standard deviation of the estimate. However because the underlying distribution is not clearly known (and is a matter of research), a confidence limit is not reported.


Still having problems? Please contact our helpdesk at helpdesk@eigenvector.com