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

# PreprocessingTemporalEstimator

A temporal estimator that composes a preprocessing transformer and a temporal estimator.

```
struct PreprocessingTemporalEstimator<Preprocessor, Estimator> where Preprocessor : TemporalTransformer, Estimator : TemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input
```

## Topics

### Creating an estimator

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

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

### Getting the properties

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

The estimator.

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

The preprocessing transformer.

### Preprocesing and fitting

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

Preprocesses a sequence of examples.

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

Fits a transformer to a sequence of examples.

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

Fits a transformer to a sequence of preprocessed features.

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

The input type.

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

The intermediate type.

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

The output type.

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

A transformer that takes an input and produces an output.

## Relationships

### Conforms To

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

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

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