peal.web.analysis.group_accuracies

peal.web.analysis.group_accuracies(labels, correct, present)[source]

Accuracy of the four (class, concept present) groups.

Parameters:
  • labels (sequence) – Per image: true class (0 or 1), whether the prediction was right and whether the concept is active.

  • correct (sequence) – Per image: true class (0 or 1), whether the prediction was right and whether the concept is active.

  • present (sequence) – Per image: true class (0 or 1), whether the prediction was right and whether the concept is active.

Returns:

groups (list of {"class", "concept", "n", "accuracy"}, empty groups with accuracy None), average (mean over the non-empty groups) and worst (their minimum), both None without data.

Return type:

dict