> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ValidationParams Object (IValidationParams Interface)

> ValidationParams object (IValidationParams interface) in the ABBYY FineReader Engine API — parameters that control classification-model validation, including k-fold cross-validation settings.

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:<br />On each iteration, the categorized data provided in the [TrainingData](/fine-reader/engine/api-reference/classification-related-objects/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.<br />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](/fine-reader/engine/api-reference/classification-related-objects/trainingresult#model) property, and its scores can be obtained via the [ITrainingResult::ValidationResult](/fine-reader/engine/api-reference/classification-related-objects/trainingresult#validationresult) property.<br />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](/fine-reader/engine/api-reference/classification-related-objects/model/classify-method) method on another known data sample.

## Properties

| Name                    | Type                                                                                                             | Description                                                                                                                                                                   |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| AveragingMethod         | [AveragingMethodEnum](/fine-reader/engine/api-reference/enumerations/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](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)           | The number of folds used in the k-fold cross-validation algorithm. The default value of this property is 3.                                                                   |
| RepeatCount             | [int](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties)           | The number of iterations used in the algorithm. The default value of this property is 1.                                                                                      |
| ShouldPerformValidation | [VARIANT\_BOOL](/fine-reader/engine/guided-tour/advanced-techniques/programming-aspects/working-with-properties) | Specifies if the trained model should be validated. This property is FALSE by default.                                                                                        |

## Related objects

<img src="https://mintcdn.com/abbyy/B_SRGbkkbQ9YH40E/images/fine-reader/engine/validationparams.gif?s=443e161292945db8b9003f8df8893f0c" alt="ValidationParams" width="176" height="90" data-path="images/fine-reader/engine/validationparams.gif" />[](/fine-reader/engine/api-reference/classification-related-objects/trainer#validationparams)[](/fine-reader/engine/api-reference/classification-related-objects/trainer#trainingparams)[](/fine-reader/engine/api-reference/classification-related-objects/trainingparams)[](/fine-reader/engine/api-reference/classification-related-objects/trainer)

[Object Diagram](/fine-reader/engine/api-reference/object-diagram)

## Samples

This object is used in the [Classification](/fine-reader/engine/guided-tour/samples#classification) demo tool in Windows and the [Classification](/fine-reader/engine/guided-tour/samples#classification_unix) code sample in Linux and macOS.

## See also

[Document Classification](/fine-reader/engine/guided-tour/basic-usage-scenarios-implementation/document-classification)
