<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/MultiLabelClassificationMetrics/meanAveragePrecisionScore(_:labels:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Create ML Components",
      "CreateMLComponents"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents31MultiLabelClassificationMetricsV25meanAveragePrecisionScore_6labelsSfqd___ShyxGtSTRd__AA0E12DistributionVyxG14classification_AfEt7ElementRtd__lFZ"
  },
  "title" : "meanAveragePrecisionScore(_:labels:)"
}
-->

# meanAveragePrecisionScore(_:labels:)

Computes the mean average precision.

```
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

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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)