<!--
{
  "availability" : [
    "Xcode: 27.0.0 -",
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Evaluations",
  "identifier" : "/documentation/Evaluations/AggregateMetric",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Evaluations"
    ],
    "preciseIdentifier" : "s:11Evaluations15AggregateMetricV"
  },
  "title" : "AggregateMetric"
}
-->

# AggregateMetric

An aggregate statistic computed from a metric’s results across the evaluation dataset.

```
struct AggregateMetric
```

## Overview

```swift
let accuracy = Metric("Accuracy")
let op = AggregationOperation.mean(of: accuracy)
print(op.label) // "Mean of Accuracy"
```

The summary DataFrame stores one `AggregateMetric` for each column. Each value records
the operation that produced it, and derives its display label and source metric name
from the operation.

## Topics

### Instance Properties

[`let group: String?`](/documentation/Evaluations/AggregateMetric/group)

The group this aggregate belongs to, if any.

[`var label: String`](/documentation/Evaluations/AggregateMetric/label)

The display label for this aggregate.

[`let operation: AggregationOperation`](/documentation/Evaluations/AggregateMetric/operation)

The aggregation operation that produced this value.

[`var sourceMetric: String?`](/documentation/Evaluations/AggregateMetric/sourceMetric)

The name of the source metric.

[`let value: Double`](/documentation/Evaluations/AggregateMetric/value)

The aggregate value.

## Relationships

### Conforms To

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Sendable`](/documentation/Swift/Sendable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)