<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/PreprocessingSupervisedTabularEstimator/fitted(toPreprocessed:validateOn:eventHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents39PreprocessingSupervisedTabularEstimatorV6fitted14toPreprocessed10validateOn12eventHandlerAA08ComposedE11TransformerVyx0O0Qy_G0E4Data0P5FrameV_AOSgyAA5EventVYbcSgtYaKF"
  },
  "title" : "fitted(toPreprocessed:validateOn:eventHandler:)"
}
-->

# fitted(toPreprocessed:validateOn:eventHandler:)

Fits a transformer to a data frame of preprocessed examples while validating.

```
func fitted(toPreprocessed preprocessedInput: DataFrame, validateOn preprocessedValidation: DataFrame?, eventHandler: EventHandler? = nil) async throws -> PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer
```

## Parameters

`preprocessedInput`

A data frame of preprocessed features used for fitting the transformer.

`preprocessedValidation`

A data frame of preprocessed features used for validating the fitted transformer.

`eventHandler`

An event handler.

## Return Value

The fitted transformer.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)