update(_:with:eventHandler:)
Updates a model with a sequence of features.
Declaration
func update(_ model: inout LinearTimeSeriesForecaster<Scalar>.Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: EventHandler? = nil) async throwsParameters
- model:
The model to update.
- input:
A sequence of annotated features. The feature shape must be
[featureSize]and the annotation shape must be[annotationSize]. - eventHandler:
An event handler.
Discussion
This method uses a sliding window to chunk the input features into features of inputWindowSize elements and annotations of forecastWindowSize elements. If you want to use a different windowing strategy, use update(_:withWindows:eventHandler:).