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

# Train Method of the ClassificationTrainer Object

This method trains the classifier on the pages of the batch that belong to the documents with the [**TrainingState**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/classificationtrainingdocument.md#trainingstate) property set to DTS\_ForTraining. The result is then tested on the pages of the documents with this property set to DTS\_ForTesting and compared with the testing run of the classifier currently in use. The complete testing statistics are returned via the [**TrainingResults**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/trainingresults.md) object.

## Syntax

```vb Visual Basic .NET theme={null}
Function Train() As TrainingResults
```

```cpp C++ theme={null}
HRESULT Train(
  ITrainingResults* Result
);
```

## Parameters

**Result**

\[out, retval] A pointer to the [**ITrainingResults**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/trainingresults.md)**\*** variable that receives the interface pointer of the output [**TrainingResults**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/trainingresults.md) object. The results of training include the testing statistics for the new classifier and the classifier currently used by the batch, together with the recommendation on whether the new classifier is better.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FlexiCapture SDK functions](https://docs.abbyy.com/flexi-capture/sdk/api-reference/errorcodes.md).

## See also

[**ClassificationTrainer**](https://docs.abbyy.com/flexi-capture/sdk/api-reference/classificationtrainer.md)
