infer_labels()

audmetric.utils.infer_labels(truth, prediction)[source]

Infer labels from truth and prediction.

It gathers all labels that are present in the truth and prediction values.

Parameters:
  • truth (Sequence[object]) – ground truth labels

  • prediction (Sequence[object]) – predicted labels

Return type:

list[object]

Returns:

labels in sorted order