<!-- Source: https://docs.squirro.com/en/latest/api/squirro.lib.nlp.steps.classifiers.AutoMLClassifier.html -->
# AutoMLClassifier

**`class AutoMLClassifier(config)`**

Bases: [`Classifier`](squirro.lib.nlp.steps.classifiers.Classifier.md#squirro.lib.nlp.steps.classifiers.Classifier)

The AutoML [`Classifier`](squirro.lib.nlp.steps.classifiers.Classifier.md#squirro.lib.nlp.steps.classifiers.Classifier) uses the [autogluon tabular](https://auto.gluon.ai) library for AutoML

**Input** - all input fields need to be of type [`str`](https://docs.python.org/3.11/library/stdtypes.html#str).

**Output** - prediction of the extract as a string

Parameters

- `type` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – automl
- `preset` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Choose between presets “best_quality” “high_quality” “good_quality” “medium_quality”
- `hyperparameters` ([`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)`, ``None`) – Hyperparameters for additional models. If None, the default hyperparameters are used.
- `fit_parameters` ([`dict`](https://docs.python.org/3.11/library/stdtypes.html#dict)`, ``None`) – Parameters for the TabularPredictor.fit() function. If None, the default parameters are used.

**Example**

```json
{
    "step": "classifier",
    "type": "automl",
    "input_fields": ["extract"],
    "output_field": "prediction",
    "label_field": "label",
    "hyperparameters": {"FASTTEXT": []},
    "fit_parameters": {"time_limit": 30, "num_bag_folds": 5}
}
```

Methods SummaryMethods Documentation

**`clean()`**

Clean step

**`evaluate(tabular_docs)`**

**`load()`**

Load a step

**`process_batch(batch)`**

Process a batch of documents. If not defined will default to using
self.process_doc for each document in the batch.

Parameters

`batch` ([`list`](https://docs.python.org/3.11/library/stdtypes.html#list)`(`[`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document)`)`) – List of documents

Returns

List of processed documents

Return type

[list](https://docs.python.org/3.11/library/stdtypes.html#list)([Document](../technical/libnlp/base.md#squirro.lib.nlp.document.Document))

**`train(docs)`**

Train on a step of a set of documents

Parameters

`docs` (`generator``(`[`Document`](../technical/libnlp/base.md#squirro.lib.nlp.document.Document)`)`) – Generator of documents

Returns

Generator of processed documents

Return type

generator([Document](../technical/libnlp/base.md#squirro.lib.nlp.document.Document))
