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



How to use TCrossValidator



The class TCrossValidator is a class to perform cross validation of statistical models. The application of this class is quite simple and straightforward. First you have to load the independent data into matrix XMat and the response data into YMat. After specifying the size of the test set by assigning a suitable value to property SizeTestSet you have to call Execute in order to start the cross validation.

The TCrossValidator class triggers two events which must perform the creation and the application of the model to be cross validated. The handler for the OnModelCreateRequest event has to create a new model using the parameters passed to it, the OnModelApplyRequest event handler has to apply this model to test data supplied via its parameters. These two event handlers should also be used to provide feedback on the progress of the cross validation.

After the cross validation has finished the readonly property RMSEP returns the results.

As cross validations may become time consuming, the event OnCheckAbort is regularly called by the cross validator to be able to abort the process.


Last Update: 2023-Feb-06