Contents

fitted(toWindows:eventHandler:)

Fits a model to a sequence of windows.

Declaration

func fitted(toWindows input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: EventHandler? = nil) async throws -> LinearTimeSeriesForecaster<Scalar>.Model

Parameters

  • input:

    A sequence of annotated windows. Each window’s shape should be [inputWindowSize, featureSize] and each annotation’s shape should be [forecastWindowSize, annotationSize].

  • eventHandler:

    An event handler.

Return Value

The fitted model.

See Also

Updating and fitting