---
title: "init(features:annotations:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/annotatedbatch/init(features:annotations:)"
---

# init(features:annotations:)

Creates an annotated batch.

## Declaration

```swift
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>)
```

## Parameters

- `features`: A shaped array of features.
- `annotations`: A shaped array of annotations.

## Discussion

Discussion The features and annotations must have the same rank, and the first dimensions must be equal.
