<!--
{
  "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/StandardScaler/Transformer",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components",
      "CreateMLComponents"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents14StandardScalerV11TransformerV"
  },
  "title" : "StandardScaler.Transformer"
}
-->

# StandardScaler.Transformer

A transformer that standardizes the input by removing the mean and scaling to unit variance.

```
struct Transformer
```

## Topics

### Creating a transformer

[`init(mean: Element, standardDeviation: Element)`](/documentation/CreateMLComponents/StandardScaler/Transformer/init(mean:standardDeviation:))

Creates a standard scaling transformer.

### Getting the properties

[`var mean: Element`](/documentation/CreateMLComponents/StandardScaler/Transformer/mean)

The mean used for offsetting.

[`var standardDeviation: Element`](/documentation/CreateMLComponents/StandardScaler/Transformer/standardDeviation)

The standard deviation used for scaling.

### Performing the transformation

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

Scales the input values using the calculation `(input - mean) / standardDeviation`.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

[`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)