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

# UpdatableEstimatorToSupervisedAdaptor

An adaptor that exposes an updatable estimator as an updatable supervised estimator.

```
struct UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation> where Estimator : UpdatableEstimator, Annotation : Equatable
```

## Topics

### Creating an adaptor

[`init(Estimator)`](/documentation/CreateMLComponents/UpdatableEstimatorToSupervisedAdaptor/init(_:))

Creates an estimator adaptor.

### Getting the estimator

[`let estimator: Estimator`](/documentation/CreateMLComponents/UpdatableEstimatorToSupervisedAdaptor/estimator)

The wrapped estimator.

### Encoding and decoding

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

Does nothing since this estimator uses a pre-defined transformer.

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

Returns the pre-defined transformer.

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

Encodes the transformer and optimizer to an encoder.

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

Reads the encoded transformer and optimizer.

### Fitting and Updating

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

Fits a transformer to a sequence of examples, ignoring the annotations and the validation.

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

Fits a transformer to a sequence of examples.

[`func makeTransformer() -> Estimator.Transformer`](/documentation/CreateMLComponents/UpdatableEstimatorToSupervisedAdaptor/makeTransformer())

Creates a default-initialized transformer suitable for incremental fitting.

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

Updates a transformer with a new sequence of examples.

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

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

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

A transformer that takes an input and produces an output.

## Relationships

### Conforms To

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

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

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

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

---

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)