---
title: LinearTransformer
framework: createmlcomponents
role: symbol
role_heading: Structure
path: createmlcomponents/lineartransformer
---

# LinearTransformer

A transformer that runs an input through a scale and offset.

## Declaration

```swift
struct LinearTransformer<Element> where Element : BinaryFloatingPoint, Element : Decodable, Element : Encodable
```

## Topics

### Creating a regressor

- [init(scale:offset:)](createmlcomponents/lineartransformer/init(scale:offset:).md)

### Getting the properties

- [offset](createmlcomponents/lineartransformer/offset.md)
- [scale](createmlcomponents/lineartransformer/scale.md)

### Performing the transformation

- [applied(to:eventHandler:)](createmlcomponents/lineartransformer/applied(to:eventhandler:).md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [Transformer](createmlcomponents/transformer.md)

## See Also

### Preprocessors

- [ImputeTransformer](createmlcomponents/imputetransformer.md)
- [OneHotEncoder](createmlcomponents/onehotencoder.md)
- [OrdinalEncoder](createmlcomponents/ordinalencoder.md)
- [NumericImputer](createmlcomponents/numericimputer.md)
- [Reshaper](createmlcomponents/reshaper.md)
- [CategoricalImputer](createmlcomponents/categoricalimputer.md)
- [OptionalUnwrapper](createmlcomponents/optionalunwrapper.md)
