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

# fitted(to:eventHandler:)

Fits a numeric imputer to a sequence of elements.

## Declaration

```swift
func fitted<S>(to input: S, eventHandler: EventHandler? = nil) -> NumericImputer<Element>.Transformer where S : Sequence, S.Element == Element?
```

## Parameters

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

## Return Value

Return Value The fitted transformer.

## See Also

### Fitting

- [Transformer](createmlcomponents/transformer.md)
- [NumericImputer.Strategy](createmlcomponents/numericimputer/strategy-swift.enum.md)
