---
title: "fitted(toPreprocessed:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/preprocessingupdatableestimator/fitted(topreprocessed:eventhandler:)"
---

# fitted(toPreprocessed:eventHandler:)

Fits a transformer to a sequence of preprocessed features.

## Declaration

```swift
func fitted<S>(toPreprocessed preprocessed: S, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer where S : Sequence, Preprocessor.Output == S.Element, S.Element == Estimator.Transformer.Input
```

## Parameters

- `preprocessed`: A sequence of preprocessed features.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Preprocesing and fitting

- [preprocessed(from:eventHandler:)](createmlcomponents/preprocessingupdatableestimator/preprocessed(from:eventhandler:).md)
- [fitted(to:eventHandler:)](createmlcomponents/preprocessingupdatableestimator/fitted(to:eventhandler:).md)
- [makeTransformer()](createmlcomponents/preprocessingupdatableestimator/maketransformer().md)
- [update(_:with:eventHandler:)](createmlcomponents/preprocessingupdatableestimator/update(_:with:eventhandler:).md)
- [update(_:withPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatableestimator/update(_:withpreprocessed:eventhandler:).md)
- [PreprocessingUpdatableEstimator.Input](createmlcomponents/preprocessingupdatableestimator/input.md)
- [PreprocessingUpdatableEstimator.Intermediate](createmlcomponents/preprocessingupdatableestimator/intermediate.md)
- [PreprocessingUpdatableEstimator.Output](createmlcomponents/preprocessingupdatableestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
