<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CreateML",
  "identifier" : "/documentation/CreateML/MLRegressorMetrics/init(maximumError:rootMeanSquaredError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML18MLRegressorMetricsV12maximumError015rootMeanSquaredF0ACSd_Sdtcfc"
  },
  "title" : "init(maximumError:rootMeanSquaredError:)"
}
-->

# init(maximumError:rootMeanSquaredError:)

Creates regressor metrics describing the quality of your model.

```
init(maximumError: Double, rootMeanSquaredError: Double)
```

## Parameters

`maximumError`

The maximum error of the model for the training data.

`rootMeanSquaredError`

The root mean squared error of the model for the training data.

## Discussion

You typically don’t initialize metrics directly. Instead you get metrics
about your model after training. For example, when you train an
[`MLRegressor`](/documentation/CreateML/MLRegressor), you can look at its [`trainingMetrics`](/documentation/CreateML/MLRegressor/trainingMetrics) and
[`validationMetrics`](/documentation/CreateML/MLRegressor/validationMetrics) properties. Additionally, you can
check the performance on a test set with the
[`evaluation(on:)`](/documentation/CreateML/MLRegressor/evaluation(on:)-7pirm) method.

---

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)