<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/AnnotatedFeature",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents16AnnotatedFeatureV"
  },
  "title" : "AnnotatedFeature"
}
-->

# AnnotatedFeature

An annotated example for fitting a supervised estimator.

```
struct AnnotatedFeature<Feature, Annotation>
```

## Topics

### Creating the feature

[`init(feature: Feature, annotation: Annotation)`](/documentation/CreateMLComponents/AnnotatedFeature/init(feature:annotation:))

Creates an example with a feature and an annotation.

### Getting the properties

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

The annotation.

[`var feature: Feature`](/documentation/CreateMLComponents/AnnotatedFeature/feature)

The feature value.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)