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

# fitted(toPreprocessed:validateOn:eventHandler:)

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

## Declaration

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

## Parameters

- `preprocessedInput`: A sequence of preprocessed features.
- `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/preprocessingupdatablesupervisedtemporalestimator/preprocessed(from:eventhandler:).md)
- [fitted(to:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/fitted(to:eventhandler:).md)
- [fitted(toPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/fitted(topreprocessed:eventhandler:).md)
- [fitted(to:validateOn:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/fitted(to:validateon:eventhandler:).md)
- [makeTransformer()](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/maketransformer().md)
- [update(_:with:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/update(_:with:eventhandler:).md)
- [update(_:withPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/update(_:withpreprocessed:eventhandler:).md)
- [PreprocessingUpdatableSupervisedTemporalEstimator.Annotation](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/annotation.md)
- [PreprocessingUpdatableSupervisedTemporalEstimator.Input](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/input.md)
- [PreprocessingUpdatableSupervisedTemporalEstimator.Intermediate](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/intermediate.md)
- [PreprocessingUpdatableSupervisedTemporalEstimator.Output](createmlcomponents/preprocessingupdatablesupervisedtemporalestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
