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

# fitted(toPreprocessed:validateOn:eventHandler:)

Fits a transformer to a sequence of preprocessed examples while validating.

## Declaration

```swift
func fitted(toPreprocessed preprocessedInput: [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], validateOn preprocessedValidation: [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: EventHandler? = nil) async throws -> PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer
```

## Parameters

- `preprocessedInput`: A sequence of preprocessed features used for fitting the transformer.
- `preprocessedValidation`: A sequence of preprocessed features used for validating the fitted transformer.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Preprocesing and Fitting

- [preprocessed(from:eventHandler:)](createmlcomponents/preprocessingsupervisedtemporalestimator/preprocessed(from:eventhandler:).md)
- [fitted(to:eventHandler:)](createmlcomponents/preprocessingsupervisedtemporalestimator/fitted(to:eventhandler:).md)
- [fitted(toPreprocessed:eventHandler:)](createmlcomponents/preprocessingsupervisedtemporalestimator/fitted(topreprocessed:eventhandler:).md)
- [fitted(to:validateOn:eventHandler:)](createmlcomponents/preprocessingsupervisedtemporalestimator/fitted(to:validateon:eventhandler:).md)
- [PreprocessingSupervisedTemporalEstimator.Annotation](createmlcomponents/preprocessingsupervisedtemporalestimator/annotation.md)
- [PreprocessingSupervisedTemporalEstimator.Input](createmlcomponents/preprocessingsupervisedtemporalestimator/input.md)
- [PreprocessingSupervisedTemporalEstimator.Intermediate](createmlcomponents/preprocessingsupervisedtemporalestimator/intermediate.md)
- [PreprocessingSupervisedTemporalEstimator.Output](createmlcomponents/preprocessingsupervisedtemporalestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
