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

# fitted(to:validateOn:eventHandler:)

Fits a transformer to a sequence of examples.

## Declaration

```swift
func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: EventHandler? = nil) async throws -> UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Sequence, Validation : Sequence, Input.Element == AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == AnnotatedFeature<Estimator.Transformer.Input, Annotation>
```

## Parameters

- `input`: A sequence of examples 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 and Updating

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