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

# LogisticRegressionClassifierModel

A trained logistic regression classifier model.

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

## Topics

### Creating a regression model

[`init(coefficients: some Sequence<Scalar>, labels: Set<Label>)`](/documentation/CreateMLComponents/LogisticRegressionClassifierModel/init(coefficients:labels:))

Creates a logistic regression model.

### Getting the properties

[`var coefficients: [Scalar]`](/documentation/CreateMLComponents/LogisticRegressionClassifierModel/coefficients)

The linear coefficients.

[`var featureCount: Int`](/documentation/CreateMLComponents/LogisticRegressionClassifierModel/featureCount)

The number of features expected in the input.

### Performing the classification

[`func applied(to: MLShapedArray<Scalar>, eventHandler: EventHandler?) async throws -> ClassificationDistribution<Label>`](/documentation/CreateMLComponents/LogisticRegressionClassifierModel/applied(to:eventHandler:))

Performs a classification on a single input.

## Relationships

### Conforms To

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

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

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

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