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

# FullyConnectedNetworkClassifier

A classifier that uses a fully connected network.

```
struct FullyConnectedNetworkClassifier<Scalar, Label> where Scalar : MLShapedArrayScalar, Scalar : BinaryFloatingPoint, Label : Comparable, Label : Decodable, Label : Encodable, Label : Hashable
```

## Topics

### Creating the classifier

[`init(labels: Set<Label>, configuration: FullyConnectedNetworkConfiguration)`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/init(labels:configuration:))

Creates a fully connected network classifier.

### Getting the properties

[`var labels: Set<Label>`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/labels)

The set of possible labels.

[`var configuration: FullyConnectedNetworkConfiguration`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/configuration)

The fully-connected-network configuration.

### Encoding and decoding

[`func encodeWithOptimizer(FullyConnectedNetworkClassifier<Scalar, Label>.Transformer, to: inout any EstimatorEncoder) throws`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/encodeWithOptimizer(_:to:))

Encodes a fitted transformer with an optimizer.

[`func decode(from: inout any EstimatorDecoder) throws -> FullyConnectedNetworkClassifierModel<Scalar, Label>`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/decode(from:))

Decodes the estimator.

### Fitting a classifier

[`func fitted<Input>(to: Input, eventHandler: EventHandler?) async throws -> FullyConnectedNetworkClassifierModel<Scalar, Label>`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/fitted(to:eventHandler:))

Fits a fully connected network classifier model to a sequence of examples.

[`func fitted<Input, Validation>(to: Input, validateOn: Validation, eventHandler: EventHandler?) async throws -> FullyConnectedNetworkClassifierModel<Scalar, Label>`](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/fitted(to:validateOn:eventHandler:))

Fits a fully connected network classifier model to a sequence of examples.

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

The annotation type.

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

The transformer type created by this estimator.

### Default Implementations

[SupervisedEstimator Implementations](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/SupervisedEstimator-Implementations)

[UpdatableSupervisedEstimator Implementations](/documentation/CreateMLComponents/FullyConnectedNetworkClassifier/UpdatableSupervisedEstimator-Implementations)

## Relationships

### Conforms To

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

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

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

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

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

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