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

# SupervisedEstimator

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

```
protocol SupervisedEstimator<Transformer, Annotation>
```

## Topics

### Reading and writing

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

Reads the encoded transformer from a file.

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

Writes the encoded transformer to a file.

[`associatedtype Annotation : Equatable`](/documentation/CreateMLComponents/SupervisedEstimator/Annotation)

The annotation type.

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

The transformer type created by this estimator.

### Appending

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

Composes this supervised estimator with an estimator.

### Adapting and fitting

[`func adaptedAsTemporal() -> SupervisedEstimatorToTemporalAdaptor<Self>`](/documentation/CreateMLComponents/SupervisedEstimator/adaptedAsTemporal())

Exposes this supervised estimator as a temporal supervised estimator.

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

Fits a transformer to a sequence of examples.

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

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

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

[`func fitted<Input, Validation>(to: Input, validateOn: Validation) async throws -> Self.Transformer`](/documentation/CreateMLComponents/SupervisedEstimator/fitted(to:validateOn:))

### Encoding and decoding

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

Encodes a fitted transformer.

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

Decodes a previously fitted transformer.

## Relationships

### Conforming Types

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

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

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

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

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

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

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

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

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

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

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

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

### Inherited By

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

---

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)