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

# Training your classifier

> Train a classifier in ABBYY FlexiCapture: split documents into For Training and For Testing states, run a benchmark test, and launch the training.

To start training a classifier, click **Classification Training →** Train.

<Note>
  You can train the classifier on specific documents by selecting them and clicking **Classification Training →** Classify.
</Note>

Before you can use the classifier that you have created, you need to train it and test it using examples of real images. Classifier training is based on the reference classes specified in the classifier's settings. When training a classifier, a document should be in one of the following states:

* Unused – the document is not used when training a classifier. In the thumbnail view mode (the <img src="https://mintcdn.com/abbyy/M5jnw37NmJ-asKkj/images/flexi-capture/View_thumbnails_button.gif?fit=max&auto=format&n=M5jnw37NmJ-asKkj&q=85&s=b3fd0ee27f821a94d4b14afe72970b3c" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="22" height="19" data-path="images/flexi-capture/View_thumbnails_button.gif" /> button on the toolbar), the Unused state will be displayed using the following icon: <img src="https://mintcdn.com/abbyy/dDAYrQCagGQmZN3a/images/flexi-capture/unused.png?fit=max&auto=format&n=dDAYrQCagGQmZN3a&q=85&s=b2e8115c331317e743cb73dc9f0c5376" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="179" height="56" data-path="images/flexi-capture/unused.png" />
* For Testing – the document is used for classifier testing. In the thumbnail view mode, the For Testing state will be denoted by the following icon: <img src="https://mintcdn.com/abbyy/krz5RorXCXcZNXDM/images/flexi-capture/test.png?fit=max&auto=format&n=krz5RorXCXcZNXDM&q=85&s=8f261e273e9cac644080cafd28c8922b" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="181" height="59" data-path="images/flexi-capture/test.png" />
* For Training – the document is used for classifier training. This status is assigned to documents by default when they are loaded into a classifier training batch. In the thumbnail view mode, the For Training state will be denoted by the following icon: <img src="https://mintcdn.com/abbyy/dDAYrQCagGQmZN3a/images/flexi-capture/train.png?fit=max&auto=format&n=dDAYrQCagGQmZN3a&q=85&s=3f868e9dcdd8e77c6c517939ac303947" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="183" height="61" data-path="images/flexi-capture/train.png" />

Before launching the training, some of the documents need to be transferred to the For Testing state. This is necessary for further analysis of the classification results and improving the quality of the classifier.

You can automatically split a batch into training and testing documents. To do this, click the **Benchmark** <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonBenchmark.PNG?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=c2045ead443943f99a36b94c3381ee04" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="29" height="28" data-path="images/flexi-capture/ButtonBenchmark.PNG" /> button on the toolbar or select **Classification Training →** Benchmark in the main menu. In the new dialog window, specify the percentage of documents that you need to use for training and for testing. You can also specify inside each class a minimum number of documents to be used for training after a batch has been split (this number is set to 1 by default). After all values have been set, you can launch the training by selecting Run benchmark test and then clicking **OK**. If you just want to assign document states and then carry on setting up your classifier, select Only split documents and then click **OK**.

You can also split a batch manually by selecting the appropriate documents and clicking **Set Document State** in the shortcut menu or in the **Classification Training** menu.

After you have set up your classifier, launch the classifier training by doing one of the following:

* Click the **Train** <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonTrain.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=aa5fe8a2f12017288bc7aba1563f5637" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="33" height="29" data-path="images/flexi-capture/ButtonTrain.png" /> button on the toolbar.
* Select **Classification Training →** Train.
* Select Train in the shortcut menu.

<Note>
  If needed, any page can be classified regardless of its assigned state. To do this, select them and click Classify <img src="https://mintcdn.com/abbyy/39LtOHLEp1q7pm1x/images/flexi-capture/ButtonClassify.png?fit=max&auto=format&n=39LtOHLEp1q7pm1x&q=85&s=b389816ac67c23576d5c014347bc8fd3" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="31" height="28" data-path="images/flexi-capture/ButtonClassify.png" /> on the toolbar or in the **Classification Training** menu. This might be necessary for assigning reference classes to pages based on their classification, as well as for testing the classifier you have created using particular pages.
</Note>

The names of the resulting and reference classes (or the absence of both) will be highlighted using the classification results color.

<Accordion title="Examples...">
  * <img src="https://mintcdn.com/abbyy/jk6a9TGm7KRcVxRI/images/flexi-capture/document_state_fortesting.png?fit=max&auto=format&n=jk6a9TGm7KRcVxRI&q=85&s=21b660bde1cec92f7238e175f5739b92" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="180" height="202" data-path="images/flexi-capture/document_state_fortesting.png" /> – the resulting class is highlighted in bright red since it does not match the reference class. The page’s state is set to For Testing.
  * <img src="https://mintcdn.com/abbyy/jk6a9TGm7KRcVxRI/images/flexi-capture/document_state_fortraining.png?fit=max&auto=format&n=jk6a9TGm7KRcVxRI&q=85&s=ced17c54ac65a98b978b5739640b9199" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="186" height="200" data-path="images/flexi-capture/document_state_fortraining.png" /> – the resulting class is highlighted in dull red since it does not match the reference class. The page’s state is set to For Training.
  * <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/document_state_unused.png?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=ecc9d0941ffbc28dda7172573810b4a2" alt="" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="184" height="197" data-path="images/flexi-capture/document_state_unused.png" /> – the resulting class is highlighted in green since it matches the reference class. However, the page’s state is set to Unused, hence the reference class name is highlighted in grey.
</Accordion>

After the classifier has been tested using the test batch, you can [view the statistics and analyze the classification results](/flexi-capture/classify-fc-statistics).
