<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/ImputeTransformer",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents17ImputeTransformerV"
  },
  "title" : "ImputeTransformer"
}
-->

# ImputeTransformer

A transformer that replaces missing values with a pre-defined value.

```
struct ImputeTransformer<Element> where Element : Decodable, Element : Encodable
```

## Topics

### Creating a transformer

[`init(value: Element)`](/documentation/CreateMLComponents/ImputeTransformer/init(value:))

Creates an impute transformer.

### Getting the impute value

[`var value: Element`](/documentation/CreateMLComponents/ImputeTransformer/value)

Impute value used to replace missing values.

### Performing the transformation

[`func applied(to: Element?, eventHandler: EventHandler?) -> Element`](/documentation/CreateMLComponents/ImputeTransformer/applied(to:eventHandler:))

Imputes a single input.

## Relationships

### Conforms To

[`Transformer`](/documentation/CreateMLComponents/Transformer)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

[`Encodable`](/documentation/Swift/Encodable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`Decodable`](/documentation/Swift/Decodable)

---

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)