---
title: TimeSeriesForecasterAnnotatedWindows
framework: createmlcomponents
role: symbol
role_heading: Structure
path: createmlcomponents/timeseriesforecasterannotatedwindows
---

# TimeSeriesForecasterAnnotatedWindows

A sequence of forecasting windows on a time series shaped array.

## Declaration

```swift
struct TimeSeriesForecasterAnnotatedWindows<Scalar> where Scalar : MLShapedArrayScalar
```

## Overview

Overview A time-series forecaster takes a series of samples and produces a prediction of the next samples. For example the sequence [1, 2, 3, 4] could predict [5, 6]. The shape of each feature in the sequence is [inputWindowSize, featureSize] and the shape of each annotation is [forecastWindowSize, annotationSize]. The sequence will return as many feature-annotation examples as fit in the input. For example an input sequence of size of 10 with an input sample count of 4, a prediction sample count of 2, and a stride of 1 will produce 5 annotated windows: feature: [1, 2, 3, 4], annotation: [5, 6] feature: [2, 3, 4, 5], annotation: [6, 7] feature: [3, 4, 5, 6], annotation: [7, 8] feature: [4, 5, 6, 7], annotation: [8, 9] feature: [5, 6, 7, 8], annotation: [9, 10] Note that 9 and 10 are never used as features because there would be no annotations for those samples.

## Topics

### Creating a time series forecaster annotated window

- [init(features:annotations:inputWindowSize:forecastWindowSize:stride:shufflesElements:)](createmlcomponents/timeseriesforecasterannotatedwindows/init(features:annotations:inputwindowsize:forecastwindowsize:stride:shuffleselements:).md)

### Inspecting a time series forecaster annotated window

- [annotations](createmlcomponents/timeseriesforecasterannotatedwindows/annotations.md)
- [features](createmlcomponents/timeseriesforecasterannotatedwindows/features.md)
- [forecastWindowSize](createmlcomponents/timeseriesforecasterannotatedwindows/forecastwindowsize.md)
- [inputWindowSize](createmlcomponents/timeseriesforecasterannotatedwindows/inputwindowsize.md)
- [shufflesElements](createmlcomponents/timeseriesforecasterannotatedwindows/shuffleselements.md)
- [stride](createmlcomponents/timeseriesforecasterannotatedwindows/stride.md)

### Default Implementations

- [Sequence Implementations](createmlcomponents/timeseriesforecasterannotatedwindows/sequence-implementations.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Sequence](swift/sequence.md)

## See Also

### Time-based components

- [Creating a time-series classifier](createmlcomponents/creating-a-time-series-classifier.md)
- [Creating a time-series forecaster](createmlcomponents/creating-a-time-series-forecaster.md)
- [DateFeatures](createmlcomponents/datefeatures.md)
- [DateFeatureExtractor](createmlcomponents/datefeatureextractor.md)
- [LinearTimeSeriesForecaster](createmlcomponents/lineartimeseriesforecaster.md)
- [LinearTimeSeriesForecasterConfiguration](createmlcomponents/lineartimeseriesforecasterconfiguration.md)
- [TimeSeriesForecasterBatches](createmlcomponents/timeseriesforecasterbatches.md)
- [TemporalFeature](createmlcomponents/temporalfeature.md)
- [TemporalSequence](createmlcomponents/temporalsequence.md)
- [TemporalSegmentIdentifier](createmlcomponents/temporalsegmentidentifier.md)
- [SlidingWindows](createmlcomponents/slidingwindows.md)
- [SlidingWindowTransformer](createmlcomponents/slidingwindowtransformer.md)
- [Downsampler](createmlcomponents/downsampler.md)
- [VideoReader](createmlcomponents/videoreader.md)
- [TemporalFileSegment](createmlcomponents/temporalfilesegment.md)
