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

# PreprocessingUpdatableSupervisedTemporalEstimator

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

```
struct PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator> where Preprocessor : TemporalTransformer, Estimator : UpdatableSupervisedTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input
```

## Topics

### Creating an estimator

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

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

### Getting the properties

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

The estimator.

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

The preprocessing transformer.

### Encoding and decoding

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

Reads the encoded transformer and optimizer with a decoder.

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

Encodes the transformer and optimizer to an encoder.

### Preprocesing and fitting

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

Preprocesses a sequence of examples.

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

Fits a transformer to a sequence of examples.

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

Fits a transformer to a sequence of preprocessed features.

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

Fits a transformer to a sequence of examples while validating with a validation sequence.

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

Fits a transformer to a sequence of preprocessed features while validating.

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

Creates a default-initialized transformer suitable for incremental fitting.

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

Updates a transformer with a new sequence of examples.

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

Updates a transformer with a new sequence of preprocessed features.

[`typealias Annotation`](/documentation/CreateMLComponents/PreprocessingUpdatableSupervisedTemporalEstimator/Annotation)

The annotation type.

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

The input type.

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

The intermediate type.

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

The output type.

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

A transformer that takes an input and produces an output.

## Relationships

### Conforms To

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

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

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

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