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

# fitted(to:validateOn:eventHandler:)

Fits a transformer to a sequence of examples while validating with a validation sequence.

## Declaration

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

## Parameters

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

## Return Value

Return Value The fitted transformer.

## See Also

### Fitting

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