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

# TemporalTransformerToEstimatorAdaptor

A temporal estimator that always returns a predefined temporal transformer.

```
struct TemporalTransformerToEstimatorAdaptor<Transformer> where Transformer : TemporalTransformer
```

## Topics

### Creating an estimator

[`init(Transformer)`](/documentation/CreateMLComponents/TemporalTransformerToEstimatorAdaptor/init(_:))

Creates a trivial estimator.

### Getting the transformer

[`let transformer: Transformer`](/documentation/CreateMLComponents/TemporalTransformerToEstimatorAdaptor/transformer)

A pre-defined transformer.

### Encoding and decoding

[`func encode(Transformer, to: inout any EstimatorEncoder) throws`](/documentation/CreateMLComponents/TemporalTransformerToEstimatorAdaptor/encode(_:to:))

Does nothing since this estimator uses a pre-defined transformer.

[`func decode(from: inout any EstimatorDecoder) throws -> Transformer`](/documentation/CreateMLComponents/TemporalTransformerToEstimatorAdaptor/decode(from:))

Returns the pre-defined transformer.

### Fitting

[`func fitted<InputSequence>(to: InputSequence, eventHandler: EventHandler?) async throws -> Transformer`](/documentation/CreateMLComponents/TemporalTransformerToEstimatorAdaptor/fitted(to:eventHandler:))

Returns the pre-defined transformer.

## Relationships

### Conforms To

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

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

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

---

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)