---
title: "fitted(to:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/logisticregressionclassifier/fitted(to:eventhandler:)"
---

# fitted(to:eventHandler:)

Fits a logistic regression classifier model to a sequence of examples while validating with a validation sequence.

## Declaration

```swift
func fitted<Input>(to input: Input, eventHandler: EventHandler? = nil) async throws -> LogisticRegressionClassifier<Scalar, Label>.Transformer where Input : Sequence, Input.Element == AnnotatedFeature<MLShapedArray<Scalar>, Label>
```

## Parameters

- `input`: A sequence of examples used for fitting the transformer.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Fitting

- [fitted(to:validateOn:eventHandler:)](createmlcomponents/logisticregressionclassifier/fitted(to:validateon:eventhandler:).md)
- [LogisticRegressionClassifier.Annotation](createmlcomponents/logisticregressionclassifier/annotation.md)
- [LogisticRegressionClassifier.Transformer](createmlcomponents/logisticregressionclassifier/transformer.md)
