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

# fitted(to:validateOn:eventHandler:)

Fits a composed transformer to a data frame of examples.

## Declaration

```swift
func fitted(to input: DataFrame, validateOn validation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer
```

## Parameters

- `input`: A data frame containing examples used for fitting the transformer.
- `validation`: A data frame containing examples used for validating the fitted transformer.
- `eventHandler`: An event handler.

## Return Value

Return Value The fitted transformer.

## See Also

### Preprocesing and fitting

- [fitted(toPreprocessed:validateOn:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/fitted(topreprocessed:validateon:eventhandler:).md)
- [makeTransformer()](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/maketransformer().md)
- [preprocessed(from:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/preprocessed(from:eventhandler:).md)
- [update(_:with:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/update(_:with:eventhandler:).md)
- [update(_:withPreprocessed:eventHandler:)](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/update(_:withpreprocessed:eventhandler:).md)
- [PreprocessingUpdatableSupervisedTabularEstimator.Annotation](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/annotation.md)
- [PreprocessingUpdatableSupervisedTabularEstimator.Input](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/input.md)
- [PreprocessingUpdatableSupervisedTabularEstimator.Intermediate](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/intermediate.md)
- [PreprocessingUpdatableSupervisedTabularEstimator.Output](createmlcomponents/preprocessingupdatablesupervisedtabularestimator/output.md)
- [Transformer](createmlcomponents/transformer.md)
