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

**`class Classifier(config)`**

Bases: [`BatchedStep`](../technical/libnlp/steps/standard.md#squirro.lib.nlp.steps.batched_step.BatchedStep)

[`Classifier`](#squirro.lib.nlp.steps.classifiers.Classifier) steps attempt to guess a specified label_field
given an input_field or input_fields. It writes its guess to a
specified output_field along with a potential explanation in the
explanation_field.

Parameters

- `step` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – classifier
- `type` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Type of [`Classifier`](#squirro.lib.nlp.steps.classifiers.Classifier)
- `explanation_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)`, ``None`) – Field with explanation of prediction
- `input_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)`, ``None`) – Field to use as input
- `input_fields` ([`list`](https://docs.python.org/3.11/library/stdtypes.html#list)`, ``None`) – List of fields to form a feature vector
- `label_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Field with ground-truth label (used for training)
- `output_field` ([`str`](https://docs.python.org/3.11/library/stdtypes.html#str)) – Field where prediction is written
