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

# PreprocessingUpdatableTemporalEstimator

An updatable temporal estimator that composes a preprocessing transformer and an updatable temporal estimator.

```
struct PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator> where Preprocessor : TemporalTransformer, Estimator : UpdatableTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input
```

## Topics

### Creating an estimator

[`init(Preprocessor, Estimator)`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/init(_:_:))

Creates a composed temporal estimator from a preprocessing transformer and a temporal estimator.

### Getting the properties

[`var estimator: Estimator`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/estimator)

The estimator.

[`var preprocessor: Preprocessor`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/preprocessor)

The preprocessing transformer.

### Encoding and decoding

[`func encodeWithOptimizer(PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, to: inout any EstimatorEncoder) throws`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/encodeWithOptimizer(_:to:))

Encodes the transformer and optimizer to an encoder.

[`func decodeWithOptimizer(from: inout any EstimatorDecoder) throws -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/decodeWithOptimizer(from:))

Reads the encoded transformer and optimizer with a decoder.

### Preprocesing and fitting

[`func preprocessed<InputSequence>(from: InputSequence, eventHandler: EventHandler?) async throws -> [PreprocessedFeatureSequence<Preprocessor.Output>]`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/preprocessed(from:eventHandler:))

Preprocesses a sequence of examples.

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

Fits a transformer to a sequence of examples.

[`func fitted(toPreprocessed: [PreprocessedFeatureSequence<Preprocessor.Output>], eventHandler: EventHandler?) async throws -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/fitted(toPreprocessed:eventHandler:))

Fits a transformer to a sequence of preprocessed features.

[`func update<InputSequence>(inout PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed: InputSequence, eventHandler: EventHandler?) async throws`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/update(_:withPreprocessed:eventHandler:))

Updates a transformer with a new sequence of preprocessed features.

[`func update<InputSequence>(inout PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, with: InputSequence, eventHandler: EventHandler?) async throws`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/update(_:with:eventHandler:))

Updates a transformer with a new sequence of examples.

[`func makeTransformer() -> PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/makeTransformer())

Creates a default-initialized transformer suitable for incremental fitting.

[`typealias Input`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/Input)

The input type.

[`typealias Intermediate`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/Intermediate)

The intermediate type.

[`typealias Output`](/documentation/CreateMLComponents/PreprocessingUpdatableTemporalEstimator/Output)

The output type.

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

A transformer that takes an input and produces an output.

## Relationships

### Conforms To

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

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

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

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

---

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)