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....



CrossValidateModel


Unit: SDL_statis
Class: TPLSModel
Declaration: function CrossValidateModel (SizeTestSet: integer): double;

The method CrossValidateModel performs a cross validation of a model using the current model parameters Factors and ScalingMode based on the data contained in XMat and YMat. The parameter SizeTestSet controls the size of the test set and therefore the number of model calculations, which is given by IntPos(XMat.NrOfRows/SizeTestSet).

CrossValidateModel returns the overall RMSEP (root mean square error of prediction) as an indicator for the quality of the model. The performance of individual response variables can be obtained from the array properties CvdRmsEP, CvdFPRate, and CvdTPRate.

As cross validation runs can be time consuming (especially with large data sets and many PLS factors) the cross validation routine triggers two events at regular intervals: OnCheckCVDAbort allows to signal a desired termination of the process and OnPercentDone (PLSModel) allows to provide feeback to the user on the progress of the cross validation.

Hint: We recommend not to use full cross validation (SizeTestSet = 1) because full cross validation tends to overestimate the quality of the model (i.e. to return a RMSEP value which is too low). Depending on the size of the data set, SizeTestSet should be set to values between 2 and 10.



Last Update: 2023-Feb-06