ValidationParams Object (IValidationParams Interface)

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

Name Type Description
AveragingMethod AveragingMethodEnum

The method of calculating the average accuracy, precision, recall, and F-measure scores for classifiers with more than 2 categories.

This property is AM_Macro by default.

FoldsCount int

The number of folds used in the k-fold cross-validation algorithm.

The default value of this property is 3.

RepeatCount int

The number of iterations used in the algorithm.

The default value of this property is 1.

ShouldPerformValidation VARIANT_BOOL

Specifies if the trained model should be validated.

This property is FALSE by default.

Related objects

Object Diagram

Samples

This object is used in the Classification demo tool.

See also

Document Classification

24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.