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

# fitted(to:eventHandler:)

Fits a transformer to a sequence of examples.

## Declaration

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

## Parameters

- `input`: A sequence of examples.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Preprocesing and fitting

- [preprocessed(from:eventHandler:)](createmlcomponents/preprocessingupdatabletemporalestimator/preprocessed(from:eventhandler:).md)
- [fitted(toPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatabletemporalestimator/fitted(topreprocessed:eventhandler:).md)
- [update(_:withPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatabletemporalestimator/update(_:withpreprocessed:eventhandler:).md)
- [update(_:with:eventHandler:)](createmlcomponents/preprocessingupdatabletemporalestimator/update(_:with:eventhandler:).md)
- [makeTransformer()](createmlcomponents/preprocessingupdatabletemporalestimator/maketransformer().md)
- [PreprocessingUpdatableTemporalEstimator.Input](createmlcomponents/preprocessingupdatabletemporalestimator/input.md)
- [PreprocessingUpdatableTemporalEstimator.Intermediate](createmlcomponents/preprocessingupdatabletemporalestimator/intermediate.md)
- [PreprocessingUpdatableTemporalEstimator.Output](createmlcomponents/preprocessingupdatabletemporalestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
