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

# LinearTimeSeriesForecasterConfiguration

The configuration for a linear time-series forecaster.

```
struct LinearTimeSeriesForecasterConfiguration
```

## Topics

### Creating a linear time series forecasater configuration

[`init(inputWindowSize: Int, forecastWindowSize: Int)`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/init(inputWindowSize:forecastWindowSize:))

Creates a configuration.

### Inspecting a linear time series forecasater configuration

[`var batchSize: Int`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/batchSize)

The number of examples in each training batch.

[`var earlyStoppingIterationCount: Int`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/earlyStoppingIterationCount)

The number of iterations to use when evaluating whether to stop early.

[`var earlyStoppingTolerance: Float`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/earlyStoppingTolerance)

The early-stopping tolerance.

[`var forecastWindowSize: Int`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/forecastWindowSize)

The number of predicted samples.

[`var inputWindowSize: Int`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/inputWindowSize)

The number of input samples.

[`var learningRate: Float`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/learningRate)

The starting learning rate.

[`var maximumIterationCount: Int`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/maximumIterationCount)

The maximum number of allowed passes through the data.

[`var randomSeed: Int?`](/documentation/CreateMLComponents/LinearTimeSeriesForecasterConfiguration/randomSeed)

A seed to generate reproducible results from random operations.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)