Structure

MLRegressorMetrics

Metrics used to evaluate a regressor’s performance.

Declaration

struct MLRegressorMetrics

Overview

To understand what performance you can expect from the regressor, you start by looking at its 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. In both cases, you want to minimize the value and therefore the error.

Topics

Understanding the Model

var maximumError: Double

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

var rootMeanSquaredError: Double

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

Handling Errors

var isValid: Bool

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

var error: Error?

The underlying error present when the metrics are invalid.

Creating Metrics

init(maximumError: Double, rootMeanSquaredError: Double)

Creates regressor metrics describing the quality of your model.

Describing Metrics

var description: String

A text representation of the regressor metrics.

var debugDescription: String

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

var playgroundDescription: Any

A description of the regressor metrics shown in a playground.

See Also

Model Accuracy

Improving Your Model’s Accuracy

Use metrics to tune the performance of your machine learning model.

struct MLClassifierMetrics

Metrics used to evaluate a classifier’s performance.