Contents

meanSquaredError(_:)

Computes the root mean squared error between predicted and ground truth values.

Declaration

@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
func meanSquaredError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPoint

Parameters

  • annotatedPredictions:

    An AnnotatedPrediction object.

Return Value

The root mean squared error.

Discussion

If an empty AnnotatedPrediction is supplied, the result will be NaN.

See Also

Metrics