plexus.analysis.metrics.accuracy module

Accuracy metric implementation.

This module provides a simple accuracy metric that calculates the percentage of exact matches between predictions and reference values.

class plexus.analysis.metrics.accuracy.Accuracy

Bases: Metric

Implementation of accuracy metric for classification tasks.

Accuracy is calculated as the number of correct predictions divided by the total number of predictions, expressed as a value between 0 and 1.

calculate(input_data: Input) Result

Calculate accuracy between prediction and reference data.

Args:

input_data: Metric.Input containing reference and prediction lists

Returns:

Metric.Result with the accuracy value and metadata