# Machine Learning Classifier

> `UiPath.DocumentUnderstanding.ML.Activities.MachineLearningClassifier`

`UiPath.DocumentUnderstanding.ML.Activities.MachineLearningClassifier`

## Description

Enables data classification from documents using [document classification ML models](https://docs.uipath.com/document-understanding/docs/overview-ml-packages) provided by UiPath®. The **Machine Learning Classifier** activity can work by default with Invoices, Purchase Orders, Receipts, and Utility Bills. This activity can be used only within the [Classify Document Scope](https://docs.uipath.com/activities/other/latest/document-understanding/classify-document-scope) activity.

:::note
You cannot use this activity with modern projects. Visit [Automations in Document Understanding](https://docs.uipath.com/document-understanding/automation-cloud/latest/user-guide/automations-in-document-understanding) to check the methods you can use for your modern projects.
:::

## Project compatibility

**Windows-Legacy | Windows**

## Configuration

#### Designer panel

* **Endpoint** - Provide the public ML Skill URL from the AI Center service. An **Endpoint** is required for on-premises or different Orchestrator instance scenarios. Choose only **Endpoint** or **ML Skills**, not both.
* **MLSkill** - Provides the MLSkills list available in the AI Center service. Choose the ML Skill hosting the document classification machine learning model. The **ML Skill** is the only available option when you connect the robot to the AI Center through the same Orchestrator instance.
* **ApiKey** - The API key used to provide you access to the Machine Learning Classifier. The API Key field is automatically pre-populated if defined in local project settings or in the Document Understanding framework. If you want to add the API Key manually, visit [API key](https://docs.uipath.com/document-understanding/automation-cloud/latest/user-guide/api-key) for more information about retrieving the API Key.

#### Properties panel

**Common**
* **DisplayName** - The display name of the activity.

**Misc**
* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

**Server**
* **ApiKey** - The API key used to provide you access to the Machine Learning Classifier. The API Key field is automatically pre-populated if defined in local project settings or in the Document Understanding framework. If you want to add the API Key manually, visit [API key](https://docs.uipath.com/document-understanding/automation-cloud/latest/user-guide/api-key) for more information about retrieving the API Key.
* **Endpoint** - Provide the public ML Skill URL from the AI Center service. An **Endpoint** is required for on-premises or different Orchestrator instance scenarios. Choose only **Endpoint** or **ML Skills**, not both.
* **MLSkill** - Provides the MLSkills list available in the AI Center service. Choose the ML Skill hosting the document classification machine learning model. The **ML Skill** is the only available option when you connect the robot to the AI Center through the same Orchestrator instance.
* **RetryOnFailure** - Automatically retries the machine learning model execution, to eliminate transient network errors. If checked, the activity retries the execution.
* **Timeout (milliseconds)** - Specifies the amount of time (in milliseconds) to wait for a response from the server before an error is thrown. The default value is 100000 milliseconds (100 seconds).
  :::note
  When an endpoint is added, the dropdown button of the ML Skill option is disabled and the following message is displayed: "The activity works with either an Endpoint or an ML Skill, not both. Enter an Endpoint and leave ML Skill empty, or select an ML Skill and leave Endpoint empty".
  :::

## Using the Machine Learning Classifier Wizard

1. In the **Machine Learning Classifier** wizard that automatically opens, provide the **ML Skill** and the **ApiKey** information.

   Figure 1. The ML Skill and ApiKey fields to configure for the Machine Learning Classifier

   ![The ML Skill and ApiKey fields to configure for the Machine Learning Classifier](https://dev-assets.cms.uipath.com/assets/images/activities/document-understanding-the-ml-skill-and-apikey-fields-to-configure-for-the-machine-learning-classif-b14c5cca-3f6d62de.webp)

   :::note
   Machine Learning Classifier only works with Machine Learning Classifier Skills. Using any other Skills (receipts, invoices, etc.) with it, will result in an error.
   :::
2. Select **Update activity arguments** if you wish to also use the entered values as input arguments for the activity, more precisely for the ML Skill.
3. Select **Get Capabilities**. The wizard closes after this operation
4. Select **Configure Extractors** in the **Data Extraction Scope**. A wizard is displayed.

   Figure 2. The Configure Classifiers wizard

   ![The Configure Classifiers wizard](https://dev-assets.cms.uipath.com/assets/images/activities/document-understanding-the-configure-classifiers-wizard-183549-27c8d05e-e54d41d4.webp)
5. Match **Document Type** names used in Taxonomy to classification classes used by the ML Skill. The latter can be obtained very easily by using **Get Capabilities** either by configuring it when you first drop the activity or by selecting the gear icon and then simply selecting the class names from the dropdown list. Selecting one of the options from a dropdown list automatically confirms that field.
6. Select **Save** once all fields are configured.
   :::important
   You cannot choose the same option for two distinct fields.
   :::

#### Document Understanding Integration

The **Machine Learning Classifier** activity is part of the Document Understanding Solutions. Visit the [Document Understanding Guide](https://docs.uipath.com/document-understanding/docs/document-classification) for more information.
