---
title: "decodeWithOptimizer(from:)"
framework: createmlcomponents
role: symbol
role_heading: Instance Method
path: "createmlcomponents/preprocessingupdatableestimator/decodewithoptimizer(from:)"
---

# decodeWithOptimizer(from:)

Reads the encoded transformer and optimizer.

## Declaration

```swift
func decodeWithOptimizer(from decoder: inout any EstimatorDecoder) throws -> PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer
```

## Parameters

- `decoder`: A decoder.

## Return Value

Return Value The decoded transformer.

## See Also

### Encoding and decoding

- [encodeWithOptimizer(_:to:)](createmlcomponents/preprocessingupdatableestimator/encodewithoptimizer(_:to:).md)
