# `ClassificationEvaluator`

### *class* capymoa.evaluation.ClassificationEvaluator[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L91)

Bases: [`object`](https://docs.python.org/3/builtins/functions.html#object)

Wrapper for the Classification Performance Evaluator from MOA. By default, it uses the
BasicClassificationPerformanceEvaluator

#### \_\_init_\_(schema: [Schema](capymoa.stream.Schema.md#capymoa.stream.Schema) = None, window_size=None, allow_abstaining=True, moa_evaluator=None)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L97)

#### accuracy()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L263)

#### f1_score()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L279)

#### get_instances_seen()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L154)

#### kappa()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L267)

#### kappa_m()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L275)

#### kappa_t()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L271)

#### metrics()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L231)

#### metrics_dict()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L237)

#### metrics_header()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L223)

#### metrics_per_window()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L243)

#### precision()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L283)

#### recall()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L287)

#### roc_auc()[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L291)

#### update(y_target_index: [int](https://docs.python.org/3/builtins/functions.html#int), y_pred_index: [int](https://docs.python.org/3/builtins/functions.html#int) | [None](https://docs.python.org/3/builtins/constants.html#None))[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/evaluation/evaluation.py#L157)

Update the evaluator with the ground-truth and the prediction.

* **Parameters:**
  * **y_target_index** – The ground-truth class index. This is NOT
    the actual class value, but the index of the class value in the
    schema.
  * **y_pred_index** – The predicted class index. If the classifier
    abstains from making a prediction, this value can be None.
* **Raises:**
  [**TypeError**](https://docs.python.org/3/builtins/exceptions.html#TypeError) – If the values are not valid indexes in the schema.
