<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateMLComponents",
  "identifier" : "/documentation/CreateMLComponents/MultivariateLinearRegressor/Model",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML Components",
      "CreateMLComponents"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents27MultivariateLinearRegressorV5ModelV"
  },
  "title" : "MultivariateLinearRegressor.Model"
}
-->

# MultivariateLinearRegressor.Model

A trained multivariate linear regressor model.

```
struct Model
```

## Overview> Note: Only `Float` and `Double` are currently supported as the Scalar type.

## Topics

### Creating a regressor model

[`init(weight: MLShapedArray<Scalar>, bias: MLShapedArray<Scalar>?)`](/documentation/CreateMLComponents/MultivariateLinearRegressor/Model/init(weight:bias:))

Creates a multivariate linear regressor.

### Getting the properties

[`var inputSize: Int`](/documentation/CreateMLComponents/MultivariateLinearRegressor/Model/inputSize)

The input size.

[`var outputSize: Int`](/documentation/CreateMLComponents/MultivariateLinearRegressor/Model/outputSize)

The output size.

[`var weight: MLShapedArray<Scalar>`](/documentation/CreateMLComponents/MultivariateLinearRegressor/Model/weight)

The linear coefficients.

[`var bias: MLShapedArray<Scalar>?`](/documentation/CreateMLComponents/MultivariateLinearRegressor/Model/bias)

The bias coefficients.

### Performing the regression

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

Performs a prediction on a shaped array.

## Relationships

### Conforms To

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

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

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