scorebook.metrics.accuracy
Accuracy metric implementation for Scorebook.
Accuracy Objects
@MetricRegistry.register()
class Accuracy(MetricBase)
Accuracy metric for evaluating model predictions of any type.
Accuracy = correct predictions / total predictions
score
@staticmethod
def score(outputs: List[Any],
labels: List[Any]) -> Tuple[Dict[str, Any], List[Any]]
Calculate accuracy score between predictions and references.
Arguments:
outputs
- A list of inference outputs.labels
- A list of ground truth labels.
Returns:
The aggregate accuracy score for all items (correct predictions / total predictions). The item scores for each output-label pair (true/false).