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

# fitted(to:eventHandler:)

Fits a transformer to a sequence of examples, ignoring the annotations and the validation.

## Declaration

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

## Parameters

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

## Return Value

Return Value The pre-defined transformer.

## See Also

### Fitting a transformer

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