The ModelOut structure contains all the information relative to a model and the corresponding statistics when any.
The part in common for the different models is created by the function DefineModelOut. It contains the following fields:
Structure with three fields:
Note In future versions of CuBatch this whole field may become obsolete as the both the ModelIn data structure and the X data structure may be kept within a Model file and the distinction between Models and Sessions technically abandoned.
This structure is model dependent and, apart from
the field 'algorithm', is defined within the
*Model functions or equivalents.
The 'algorithm' field contains the additional
information associated to the computed model. Its content also are set by
the *Model function responsible for handling the computation of the model.
Click on the corresponding link to check the content of the different 'info' structures
Contains the model's parameters as well as some statistics
and quality parameters associated to it.
This field is a structure or a vector of structures (for some models such
as PARAFAC and (n)PLS1).
In the latter case each element is associated to a different dimensionality
of the model.
|
Fieldname |
Content |
Class |
|
bcoeff |
Regression coefficients |
array of doubles |
|
core |
Core array |
array of doubles |
|
hotelling |
Obsolete? |
Obsolete? |
|
nbfactors |
number of factors/components/latent variables of the model |
double |
|
stats |
statistics associated to the model.§ |
structure |
|
xcumpress |
X CUMulated Prediction REsidual Sum of Squares (also known as RSS) |
double |
|
xev |
X % explained variation |
double |
|
xfactors |
loading matrices for the X array |
cell vector of doubles.In most of the models the number of elements correspond to the number of dimensions of the X array |
|
xpred |
predictions for the X array |
array of doubles of the same dimensions of the X used to compute the model. |
|
xpreproc |
X preprocessing parameters' structure
with two fields: 'cen' and
'scal'. The first refers to centring and
the second to scaling. |
The two fields are cell vectors where
the n-th element refer to the preprocessing in the n-th
mode. |
|
xpress |
X horizontal slabs (i.e. samples/batches) Prediction REsidual Sum of Squares |
vector of double. The n-th element refers to the n-th slab |
|
xrmse |
X Root Mean Squared Error. It is computed over the existing (non-missing, that is) values only |
double |
|
ycumpress |
Y CUMulated Prediction REsidual Sum of Squares (also known as RSS) |
double |
|
yev |
Y % explained variation |
double |
|
yfactors |
loading matrices for the Y array |
cell vector of doubles. |
|
ypred |
predictions for the Y array |
array of doubles of the same dimensions of the Y used to compute the model. |
|
ypreproc |
Y preprocessing parameters' structure
with two fields: 'cen' and
'scal'. The first refers to centring and
the second to scaling. |
The two fields are cell vectors where
the n-th element refer to the preprocessing in the n-th
mode. |
|
ypress |
Y horizontal slabs (i.e. samples/batches) Prediction REsidual Sum of Squares |
vector of double. The n-th element refers to the n-th slab |
|
yrmse |
Y Root Mean Squared Error. It is computed over the existing (non-missing, that is) values only |
double |
§ The fields of this structure are to be defined clearly and once and for all at the meeting taking place in Brussels on the 23 Oct. 2002
String with the model's name. The values admitted are the same as the Available_Models variable defined in AvModels
Vector of PlotStruct structures of the
type.
Its final function has been fully implemented yet. Each of the elements
should represent a possible plot available in the plant mode as defined
by an advanced user.
Contains the predicted values for a new set of samples
plus some additional information and statistics.
The fields of this structure and their contents are the following:
|
Fieldname |
Content |
Class |
|
core |
Core array Obsolete? |
array of doubles |
|
data |
Cbdataset with the set of data upon which the model is applied |
Cbdataset (double)? |
|
nbfactors |
number of factors variables of the model |
double. |
|
stats |
Statistics associated to the predictions.§ |
structure. |
|
xcumpress |
X CUMulated Prediction REsidual Sum of Squares |
double. |
|
xev |
X % explained variation in prediction (Q2) |
double |
|
xfactors |
Predicted X scores matrix |
cell element containing an array of double. |
|
xpred |
Predictions for the X array |
array of doubles of the same dimensions of the 'data' field. |
|
xpress |
X horizontal slabs (i.e. samples/batches) Prediction REsidual Sum of Squares |
vector of double. Each element refers to one sample. |
|
xrmse |
X Root Mean Squared Error. It is computed over the existing (non-missing, that is) values only |
double |
|
yfactors |
Predicted Y scores. |
cell element containing an array of double. |
|
ypred |
Predictions for the Y array |
array of doubles. |
Contains the model's parameters as determined during
the validation procedure.
It also contains some statistics and quality parameters depending on the
validation.
This field is a structure or a vector of structures (for some models such
as PARAFAC and (n)PLS1).
In the latter case each element is associated to a different dimensionality
of the model.
The content of the fields may vary according to the employed method.
|
Fieldname |
Content |
Class |
Ext. §§ |
|
bcoeff |
Regression coefficients |
array of doubles |
Yes |
|
core |
Core array |
array of doubles |
Yes |
|
method |
Four types of validation are currently available (Table 1)
|
string of chars
|
No |
|
nbfactors |
number of factors/components/latent variables of the model |
double |
No |
|
Its content depend on the methods. For 1.- 3. each column contains the
indexes of the samples/batches employed for a certain sub-model. 'loo': the number of columns of this field is equal to the number of samples. In the nth column contains the values 1 to n and n + 1 (if it exist) to I (i.e. the number of samples) '*boo': the number of columns is equal to the number of replicates. 'test':
one column vector with the samples included in the test set (only). |
array or vector of doubles |
No |
|
|
stats |
statistics associated to the model.§ |
structure |
No |
|
xcumpress |
X CUMulated Prediction REsidual Sum of Squares (also known as RSS) |
double |
No |
|
xev |
X % explained variation |
double |
No |
|
xfactors |
loading matrices for the X array |
cell vector of doubles. In most of
the models the number of elements |
Yes¤ |
|
xpred |
predictions for the X array |
array of doubles of the same dimensions of the X used to compute the model. |
No |
|
xpress |
X horizontal slabs (i.e. samples/batches) Prediction REsidual Sum of Squares |
vector of double. Each element refers to one segment. |
No |
|
xrmse |
X Root Mean Squared Error. It is computed over the existing (non-missing, that is) values only |
double |
No |
|
ycumpress |
Y CUMulated Prediction REsidual Sum of Squares (also known as RSS) |
double |
No |
|
yev |
Y % explained variation |
double |
No |
|
yfactors |
loading matrices for the Y array |
cell
vector of doubles. elements correspond to the number of dimensions of the Y array |
Yes¤ |
|
ypred |
predictions for the Y array |
array of doubles of the same dimensions of the Y used to compute the model. |
Yes¤ |
|
ypress |
Y horizontal slabs (i.e. samples/batches) Prediction REsidual Sum of Squares |
vector of double. The n-th element refers to the n-th slab |
No |
|
yrmse |
Y Root Mean Squared Error. It is computed over the existing (non-missing, that is) values only |
double |
No |
§ The fields of this structure are to be defined clearly and once and for all at the meeting taking place in Brussels on the 23 Oct. 2002
§§ When a resampling method is used (i.e. Leave One Out or Bootstrap) one mode is added to the double arrays of this field (when it is a cell this is valid for each elements).
E.g.
- if the factors in the second mode have dimensions J x F and Leave One Out validation is used, the ModelOut.xfactors{2} will have dimensions J x F x I, where I is the number of samples/batches selected for computing the model. For the core (in (n)PLS1 methods)
¤In 'loo' a further slab is added in the third dimension in the first mode (e.g the scores or the predictions for y) containing the predictions for the left out samples.