Contents

update(_:withWindows:eventHandler:)

Updates a model with a sequence of windows.

Declaration

func update(_ model: inout LinearTimeSeriesForecaster<Scalar>.Model, withWindows windows: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: EventHandler? = nil) async throws

Parameters

  • model:

    The model to update.

  • windows:

    A sequence of annotated windows. The feature shape must be [inputWindowSize, featureSize] and the annotation shape must be [forecastWindowSize, annotationSize].

  • eventHandler:

    An event handler.

Discussion

For faster updates, consider passing a single AnnotatedBatch with shaped arrays that contain multiple training examples. See update(_:with:).

See Also

Updating and fitting