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

# Improve a classifier

> Improve classifier accuracy in ABBYY FlexiCapture: adjust profiles and recall/precision, correct reference classes, and find similar pages in the batch.

## Tips for improving results

* Check whether the selected classification profile is appropriate.
* Adjust the recall/precision ratio.
* Check whether the reference classes are assigned correctly.
* Use more sample documents. Include as many document variants as possible: the larger and more varied the training batch, the more variants of each class the classifier detects.

## Document Definition confidence

Document Definition sections [mapped to document classes](/flexi-capture/classify-mapping-classes) are matched against their document sections with a degree of confidence. The names of low-confidence sections are marked in red.

If **Automatically confirm section type when matched** is enabled and the mapped section matches successfully, the section name is not highlighted. The class is then confirmed during Document Definition matching, even if it was initially determined with low confidence.

The **Automatically confirm section type when matched** option is on the **General** tab of the Document Definition section properties. It speeds up manual verification, but select it only for sections that match documents the Document Definition was created for, such as a fixed Document Definition for a fixed section with [identifiers](/flexi-capture/mrf-requirements/ap-mrf-identifier), or a FlexiLayout section with required elements. Do not select it for Document Definitions that can match any document.

When a Document Definition is matched to a page or document with low confidence, you can:

* Click **Confirm Document Definition** on the shortcut menu of the page or document.
* Modify the low-confidence page, for example by changing the section type or moving the page to another document.
* Change the Document Definition selected for the page or document.

After an operator corrects all errors so that no sections have unconfidently matched Document Definitions, the low-confidence error is removed automatically.

In the errors pane, an assembly error is reported for documents with low-confidence Document Definitions. Documents with other errors besides low confidence go to the assembly verification stage. Documents with no errors other than low-confidence classification go to the verification stage.

## Detect errors in the training batch

Classification errors usually come from incorrectly assigned reference classes or too few sample pages. To investigate a misclassified page, right-click it and use one of the **Show Similar Pages** commands, also available on the **Classification Training** menu.

| Command                                     | What it finds                                                                                                                                                     |
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Show Similar Pages**                      | Similar pages anywhere in the batch, regardless of class. Use it to find pages with a different reference class that resemble the selected page.                  |
| **Show Similar Pages from Reference Class** | Similar pages that share the selected page's reference class. Use it to check whether a page is unique: if none are found, add the page to the batch and retrain. |
| **Show Similar Pages from Result Class**    | Similar pages whose reference class matches the selected page's result class. Use it to find the pages whose wrong reference class caused the misclassification.  |

FlexiCapture searches all documents regardless of state (**For Training**, **For Testing**, or **Unused**) and lists similar pages from most to least similar.

<Frame>
  <img src="https://mintcdn.com/abbyy/krz5RorXCXcZNXDM/images/flexi-capture/similar_pages.png?fit=max&auto=format&n=krz5RorXCXcZNXDM&q=85&s=031d3266832766eba8d56ead54848936" alt="Screenshot of the ABBYY FlexiCapture Similar Pages window listing pages from the classifier batch arranged in descending order of similarity, with each thumbnail labeled by class and similarity percentage." width="790" height="468" data-path="images/flexi-capture/similar_pages.png" />
</Frame>

### Example: correct a misclassified page

<Steps>
  <Step title="Spot the misclassified page">
    In the [confusion matrix](/flexi-capture/classify-fc-statistics#confusion-matrix), find a page whose reference class is **ID** but whose result class is **Invoice**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/krz5RorXCXcZNXDM/images/flexi-capture/similar_pages_1_1.png?fit=max&auto=format&n=krz5RorXCXcZNXDM&q=85&s=1598680244df90fd6530efd97c451398" alt="Screenshot of the ABBYY FlexiCapture confusion matrix in the Classification Statistics window, with a misclassified cell showing a page whose reference class is ID but whose result class is Invoice." width="1217" height="571" data-path="images/flexi-capture/similar_pages_1_1.png" />
    </Frame>
  </Step>

  <Step title="Open the page">
    Click the page's cell in the confusion matrix.

    <Frame>
      <img src="https://mintcdn.com/abbyy/krz5RorXCXcZNXDM/images/flexi-capture/similar_pages_1_2.png?fit=max&auto=format&n=krz5RorXCXcZNXDM&q=85&s=746a2a84e19ea88571cdfce6db48ff5e" alt="Screenshot of the misclassified page opened in the ABBYY FlexiCapture Project Setup Station, with a tooltip showing its reference class is ID and its result class is Invoice." width="744" height="440" data-path="images/flexi-capture/similar_pages_1_2.png" />
    </Frame>
  </Step>

  <Step title="Show similar pages from the result class">
    Right-click the page and click **Show Similar Pages from Result Class**. FlexiCapture lists the pages that resemble the ID page but have **Invoice** as their reference class, from most to least similar.

    <Frame>
      <img src="https://mintcdn.com/abbyy/krz5RorXCXcZNXDM/images/flexi-capture/similar_pages_1_3.png?fit=max&auto=format&n=krz5RorXCXcZNXDM&q=85&s=4570dbc935dee7ebc0c29819f2155653" alt="Screenshot of the ABBYY FlexiCapture Similar Pages view showing pages with Invoice as their reference class that are similar to the misclassified ID page, ordered by descending similarity percentage." width="810" height="465" data-path="images/flexi-capture/similar_pages_1_3.png" />
    </Frame>
  </Step>

  <Step title="Fix the reference classes and retrain">
    Identify the pages with incorrectly assigned reference classes that caused the ID page to be classified as an invoice. Change the reference class where appropriate, and then retrain the classifier.
  </Step>
</Steps>
