---
title: "fitted(to:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/supervisedtemporalestimator/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?) async throws -> Self.Transformer where InputSequence : Sequence, FeatureSequence : TemporalSequence, InputSequence.Element == AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
```

## Parameters

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

## Return Value

Return Value The fitted transformer.

## See Also

### Fitting

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