Contents

update(_:with:eventHandler:)

Updates a model with a new sequence of examples.

Declaration

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

Parameters

  • model:

    A model to update.

  • input:

    A sequence of examples. For faster updates, consider passing a single Annotatedbatch with shaped arrays that contain multiple training examples. For example instead of passing a sequence of N shaped arrays with shape [M], pass a single shaped array with shape [N, M]. See also Update(_:with:).

  • eventHandler:

    An event handler. This method reports the mean squared error.

See Also

Fitting Progressively