meanAveragePrecisionScore(classifications:groundTruth:labels:)
Computes the mean average precision.
Declaration
static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, labels: Set<Label>) -> FloatParameters
- classifications:
A sequence of multi-label classifications.
- groundTruth:
A sequence of multi-label correct labels.
- labels:
The set of labels to consider.
Return Value
The mean average precision.
Discussion
An average precision score summarizes the precision-recall curve for a label. The mean average precision is the mean of the average precision scores for all the classification labels.