---
title: "fitted(toPreprocessed:eventHandler:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/preprocessingestimator/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 -> PreprocessingEstimator<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/preprocessingestimator/preprocessed(from:eventhandler:).md)
- [fitted(to:eventHandler:)](createmlcomponents/preprocessingestimator/fitted(to:eventhandler:).md)
- [PreprocessingEstimator.Input](createmlcomponents/preprocessingestimator/input.md)
- [PreprocessingEstimator.Intermediate](createmlcomponents/preprocessingestimator/intermediate.md)
- [PreprocessingEstimator.Output](createmlcomponents/preprocessingestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
