<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/Estimator",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents9EstimatorP"
  },
  "title" : "Estimator"
}
-->

# Estimator

An estimator that creates a transformer by fitting to a data set.

```
protocol Estimator<Transformer>
```

## Topics

### Getting the properties

[`associatedtype Transformer : Transformer`](/documentation/CreateMLComponents/Estimator/Transformer)

The transformer type created by this estimator.

### Appending

[`func appending(_:)`](/documentation/CreateMLComponents/Estimator/appending(_:))

Composes this estimator with another estimator.

### Encoding and decoding

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

Encodes a fitted transformer.

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

Decodes a previously fitted transformer.

### Reading and writing

[`func read(from: URL) throws -> Self.Transformer`](/documentation/CreateMLComponents/Estimator/read(from:))

Reads the encoded transformer from a file.

[`func write(Self.Transformer, to: URL, overwrite: Bool) throws`](/documentation/CreateMLComponents/Estimator/write(_:to:overwrite:))

Writes the encoded transformer to a file.

### Fitting and adapting

[`func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type) -> EstimatorToSupervisedAdaptor<Self, Annotation>`](/documentation/CreateMLComponents/Estimator/adaptedAsSupervised(annotationType:))

Exposes this estimator as a supervised estimator.

[`func adaptedAsTemporal() -> EstimatorToTemporalAdaptor<Self>`](/documentation/CreateMLComponents/Estimator/adaptedAsTemporal())

Exposes this estimator as a temporal estimator.

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

Fits a transformer to a sequence of examples.

[`func fitted<S>(to: S) async throws -> Self.Transformer`](/documentation/CreateMLComponents/Estimator/fitted(to:))

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

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

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

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

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

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

### Inherited By

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

---

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)