<!--
{
  "availability" : [
    "macOS: 10.14.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLRegressor/linear(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML11MLRegressorO6linearyAcA17MLLinearRegressorVcACmF"
  },
  "title" : "MLRegressor.linear(_:)"
}
-->

# MLRegressor.linear(_:)

A regressor that estimates the target as a linear function of the features.

```
case linear(MLLinearRegressor)
```

## Discussion

Don’t create an [`MLRegressor`](/documentation/CreateML/MLRegressor) using one of its enumeration cases. Use the regressor’s initializer instead.

---

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)