---
title: "fitted(to:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/preprocessingtemporalestimator/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 -> PreprocessingTemporalEstimator<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/preprocessingtemporalestimator/preprocessed(from:eventhandler:).md)
- [fitted(toPreprocessed:eventHandler:)](createmlcomponents/preprocessingtemporalestimator/fitted(topreprocessed:eventhandler:).md)
- [PreprocessingTemporalEstimator.Input](createmlcomponents/preprocessingtemporalestimator/input.md)
- [PreprocessingTemporalEstimator.Intermediate](createmlcomponents/preprocessingtemporalestimator/intermediate.md)
- [PreprocessingTemporalEstimator.Output](createmlcomponents/preprocessingtemporalestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
