---
title: "averageOfMeanAveragePrecisionAtVariedThresholds(predictions:annotations:confidenceThresholds:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/objectdetectionmetrics/averageofmeanaverageprecisionatvariedthresholds(predictions:annotations:confidencethresholds:)"
---

# averageOfMeanAveragePrecisionAtVariedThresholds(predictions:annotations:confidenceThresholds:)

Calculates the average of mean average precision, computed at varied bounding box overlap thresholds. The overlap thresholds range is from [0.05, 0.95] with a stride of 0.05.

## Declaration

```swift
func averageOfMeanAveragePrecisionAtVariedThresholds<Scalar>(predictions: [[DetectedObject<Label>]], annotations: [ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Float] = [:]) -> Scalar where Scalar : BinaryFloatingPoint
```

## Parameters

- `predictions`: A list of all the predictions from an object detection model. Each element in the list is a list of predictions from one image.
- `annotations`: A list of all the annotations. Each element is an ObjectDetectionAnnotation object from one image.
- `confidenceThresholds`: Confidence thresholds for each label. The values will always be between 0.0 and 1.0. If any label does not have a threshold, the defaultConfidenceThreshold is used for that label. The default value is [:].

## Return Value

Return Value The average of mean average precision, computed at varied bounding box overlap thresholds.

## See Also

### Calculating the precision

- [averageOfAveragePrecisionAtVariedThresholds(predictions:annotations:confidenceThresholds:)](createmlcomponents/objectdetectionmetrics/averageofaverageprecisionatvariedthresholds(predictions:annotations:confidencethresholds:).md)
- [averagePrecision(predictions:annotations:confidenceThresholds:overlapThreshold:)](createmlcomponents/objectdetectionmetrics/averageprecision(predictions:annotations:confidencethresholds:overlapthreshold:).md)
- [meanAveragePrecision(predictions:annotations:confidenceThresholds:overlapThreshold:)](createmlcomponents/objectdetectionmetrics/meanaverageprecision(predictions:annotations:confidencethresholds:overlapthreshold:).md)
