<!--
{
  "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/LinearRegressor/Configuration-swift.struct/convergenceThreshold",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Create ML Components"
    ],
    "preciseIdentifier" : "s:18CreateMLComponents15LinearRegressorV13ConfigurationV20convergenceThresholdSdvp"
  },
  "title" : "convergenceThreshold"
}
-->

# convergenceThreshold

The convergence threshold.

```
var convergenceThreshold: Double
```

## Discussion

When the residual is within the convergence threshold of the objective, training stops. The threshold is
also used by the `fitted` method to decide when progress is no longer being made, in which case the
training process will stop before convergence and before the specified maximum number of iterations (known
as early stopping).

Consider reducing this value for a more accurately trained model. But beware of overfitting if the it is
set to a very low value. Defaults to 0.01.

---

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)