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

# fitted(to:eventHandler:)

Fits a transformer to a sequence of examples.

## Declaration

```swift
func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: EventHandler? = nil) async throws -> UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Sequence, FeatureSequence : TemporalSequence, InputSequence.Element == AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
```

## 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 and updating

- [fitted(to:validateOn:eventHandler:)](createmlcomponents/updatabletemporalestimatortosupervisedadaptor/fitted(to:validateon:eventhandler:).md)
- [makeTransformer()](createmlcomponents/updatabletemporalestimatortosupervisedadaptor/maketransformer().md)
- [update(_:with:eventHandler:)](createmlcomponents/updatabletemporalestimatortosupervisedadaptor/update(_:with:eventhandler:).md)
- [update(_:with:validateOn:eventHandler:)](createmlcomponents/updatabletemporalestimatortosupervisedadaptor/update(_:with:validateon:eventhandler:).md)
- [Transformer](createmlcomponents/transformer.md)
