<!--
{
  "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",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Create ML"
    ],
    "preciseIdentifier" : "s:8CreateML18MLRegressorMetricsV"
  },
  "title" : "MLRegressorMetrics"
}
-->

# MLRegressorMetrics

Metrics you use to evaluate a regressor’s performance.

```
struct MLRegressorMetrics
```

## Overview

To understand what performance you can expect from the regressor, you start
by looking at its [`maximumError`](/documentation/CreateML/MLRegressorMetrics/maximumError). This high-level
metric indicates your model’s worst-case performance. To get a sense for how
your model performs on average, look at the
[`rootMeanSquaredError`](/documentation/CreateML/MLRegressorMetrics/rootMeanSquaredError). In both cases, you want to
minimize the value and therefore the error.

> Note: Each trained model contains different metrics for its various data
> sets (training, validation, and testing).
> <doc://com.apple.createml/documentation/CreateML/improving-your-model-s-accuracy> compares these metrics among different
> data sets.

## Topics

### Understanding the model

[`maximumError`](/documentation/CreateML/MLRegressorMetrics/maximumError)

The largest absolute difference between the expected values and the
model’s predicted values during testing or training.

[`rootMeanSquaredError`](/documentation/CreateML/MLRegressorMetrics/rootMeanSquaredError)

A common metric used to determine the deviation between correct and
predicted values.

### Handling errors

[`isValid`](/documentation/CreateML/MLRegressorMetrics/isValid)

A Boolean value indicating whether the regressor model was able to
calculate metrics.

[`error`](/documentation/CreateML/MLRegressorMetrics/error)

The underlying error present when the metrics are invalid.

### Creating metrics

[`init(maximumError:rootMeanSquaredError:)`](/documentation/CreateML/MLRegressorMetrics/init(maximumError:rootMeanSquaredError:))

Creates regressor metrics describing the quality of your model.

### Describing metrics

[`description`](/documentation/CreateML/MLRegressorMetrics/description)

A text representation of the regressor metrics.

[`debugDescription`](/documentation/CreateML/MLRegressorMetrics/debugDescription)

A text representation of the regressor metrics that’s suitable for
output during debugging.

[`playgroundDescription`](/documentation/CreateML/MLRegressorMetrics/playgroundDescription)

A description of the regressor metrics shown in a playground.



---

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)