<!--
{
  "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/AnnotatedPrediction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents19AnnotatedPredictionV"
  },
  "title" : "AnnotatedPrediction"
}
-->

# AnnotatedPrediction

An annotated prediction.

```
struct AnnotatedPrediction<Prediction, Annotation>
```

## Topics

### Creating an annotated prediction

[`init(prediction: Prediction, annotation: Annotation)`](/documentation/CreateMLComponents/AnnotatedPrediction/init(prediction:annotation:))

Creates an annotated preditction.

### Getting the properties

[`var annotation: Annotation`](/documentation/CreateMLComponents/AnnotatedPrediction/annotation)

The ground truth annotation.

[`var prediction: Prediction`](/documentation/CreateMLComponents/AnnotatedPrediction/prediction)

The predicted value.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)