---
title: "init(features:annotations:inputWindowSize:forecastWindowSize:stride:shufflesElements:)"
framework: createmlcomponents
role: symbol
role_heading: Initializer
path: "createmlcomponents/timeseriesforecasterannotatedwindows/init(features:annotations:inputwindowsize:forecastwindowsize:stride:shuffleselements:)"
---

# init(features:annotations:inputWindowSize:forecastWindowSize:stride:shufflesElements:)

Creates a batch sequence.

## Declaration

```swift
init(features: MLShapedArray<Scalar>, annotations: MLShapedArray<Scalar>, inputWindowSize: Int, forecastWindowSize: Int, stride: Int = 1, shufflesElements: Bool = true) throws
```

## Parameters

- `features`: A shaped array of features, it must have two dimensions.
- `annotations`: A shaped array of annotations, it must have two dimensions.
- `inputWindowSize`: The number of input samples. Must be positive.
- `forecastWindowSize`: The number of prediction samples. Must be positive.
- `stride`: The number of samples between windows. Must be positive. Defaults to 1.
- `shufflesElements`: A Boolean value indicating whether to shuffle the elements. Defaults to true.
