ClassificationWindowedEvaluator#
- class capymoa.evaluation.ClassificationWindowedEvaluator[source]#
Bases:
ClassificationEvaluator
Uses the ClassificationEvaluator to perform a windowed evaluation.
IMPORTANT: The results for the last window are not always available through
`metrics()`
, if the window_size does not perfectly divide the stream, the metrics corresponding to the last remaining instances in the last window can be obtained by invoking`metrics()`
- update(y_target_index: int, y_pred_index: int | None)[source]#
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:
ValueError – If the values are not valid indexes in the schema.