Contents

fitted(to:validateOn:eventHandler:)

Fits a logistic regression classifier model to a sequence of examples.

Declaration

func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: EventHandler? = nil) async throws -> LogisticRegressionClassifierModel<Scalar, Label> where Input : Sequence, Validation : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Label>, Validation.Element == AnnotatedFeature<MLShapedArray<Scalar>, Label>

Parameters

  • input:

    A sequence of examples used for fitting the classifier.

  • validation:

    A sequence of examples used for validating the fitted classifier.

  • eventHandler:

    An event handler. This method reports accuracy metrics.

Return Value

The fitted logistic regression classifier model.

See Also

Fitting