---
title: "meanAveragePrecisionScore(_:labels:)"
framework: createmlcomponents
role: symbol
role_heading: Type Method
path: "createmlcomponents/multilabelclassificationmetrics/meanaverageprecisionscore(_:labels:)"
---

# meanAveragePrecisionScore(_:labels:)

Computes the mean average precision.

## Declaration

```swift
static func meanAveragePrecisionScore(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, labels: Set<Label>) -> Float
```

## Parameters

- `pairs`: A sequence of classifications and true label pairs.
- `labels`: The set of labels to consider.

## Return Value

Return Value The mean average precision.

## Discussion

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.

## See Also

### Computing the precision

- [meanAveragePrecisionScore(_:)](createmlcomponents/multilabelclassificationmetrics/meanaverageprecisionscore(_:).md)
- [meanAveragePrecisionScore(classifications:groundTruth:)](createmlcomponents/multilabelclassificationmetrics/meanaverageprecisionscore(classifications:groundtruth:).md)
- [meanAveragePrecisionScore(classifications:groundTruth:labels:)](createmlcomponents/multilabelclassificationmetrics/meanaverageprecisionscore(classifications:groundtruth:labels:).md)
