Skip to main content
This object provides access to the parameters used when validating a classification model. Two strategies are open to you:
  1. Use the validation algorithm provided by ABBYY FineReader Engine. It uses the k-fold cross-validation strategy:
    On each iteration, the categorized data provided in the TrainingData object is randomly split into FoldsCount equal parts. Each of the parts, in turn, is used for validation: a model is trained on all the parts except that one, then checked on the last part.
    The process is repeated RepeatCount times. From the resulting FoldsCount * RepeatCount models, the one which shows the best F-measure score is returned by the ITrainingResult::Model property, and its scores can be obtained via the ITrainingResult::ValidationResult property.
    The number of objects in the training set on each training step will be equal to <total number of objects> * (FoldsCount - 1) / FoldsCount. Note that this number should be at least 4 for text classifier and at least 8 for combined classifier. Make sure that your training sample contains enough objects.
  2. Turn off the validation by setting ShouldPerformValidation to FALSE, train the model on the whole training data set, then test the model’s performance on your side, using the IModel::Classify method on another known data sample.

Properties

ValidationParams Object Diagram

Samples

This object is used in the Classification demo tool in Windows and the Classification code sample in Linux and macOS.

See also

Document Classification