fitted(to:eventHandler:)
Fits a linear regressor model to a sequence of examples.
Declaration
func fitted<Input>(to input: Input, eventHandler: EventHandler? = nil) async throws -> LinearRegressorModel<Scalar> where Input : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Scalar>Parameters
- input:
A sequence of examples used for fitting the regressor.
- eventHandler:
An event handler. This method reports maximum error and root-mean-square error metrics.
Return Value
The fitted linear regressor model.