<!--
{
  "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(classifications:groundTruth:labels:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Create ML Components",
      "CreateMLComponents"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents31MultiLabelClassificationMetricsV25meanAveragePrecisionScore15classifications11groundTruth6labelsSfqd___qd_0_ShyxGtSTRd__STRd_0_AA0E12DistributionVyxG7ElementRtd__AhLRtd_0_r0_lFZ"
  },
  "title" : "meanAveragePrecisionScore(classifications:groundTruth:labels:)"
}
-->

# meanAveragePrecisionScore(classifications:groundTruth:labels:)

Computes the mean average precision.

```
static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, labels: Set<Label>) -> Float
```

## Parameters

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

---

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)