The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



AppendModelParamsToFile


Unit: SDL_statis
Class: TPLSModel
Declaration: procedure AppendModelParamsToFile (var OFile: TextFile; Comment: string);

The method AppendModelParamsToFile appends the parameters of the calculated PLS model to the open text file OFile. The parameter Comment can be used to identify the stored model or to add a short description of the model.

Please note that AppendModelParamsToFile should be called only (immediately) after a model has been calculated as some routines of the TPLSModel class may destroy part of the information needed to store the model.

The following information is stored using a simple keyword based ASCII format:

Keyword Explanation
#COMMENT The string contained in the parameter Comment
#VERSION The current format version number.
#NFACT The number of factors used when creating the model.
#XVARS Predictor variables: for each predictor variable the following items are stored:
  • the index of the predictor variable
  • the minimum and the maximum value
  • the mean and the standard deviation
  • the name of the variable (property NamePredictor)
#YVARS Response variables: for each response variable the following items are stored:
  • the index of the response variable
  • the minimum and maximum value
  • the mean and the standard deviation
  • the name of the variable (property NameResponse)
#ISDISCRIM Discriminant flag, indicating whether the model is discriminant one or not; see IsDiscriminantModel for details
#CFTHRESH The classifier thresholds.
#COEFFS Coefficient matrix: the regression coefficients computed during the training
of the model (property RegCoeff)

Hint: Before saving a model it is recommended to assign the correct predictor and response variable names to the properties NamePredictor and NameResponse. The variable names can then be used to ensure the proper application of a model to unknown data by checking whether the variable names of the model and the variable names of the unknown data match.



Last Update: 2015-May-14