rootMeanSquaredError(_:_:)
Computes the root mean squared error between predicted and ground truth values.
Declaration
@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
func rootMeanSquaredError<T>(_ predicted: some Collection, _ groundTruth: some Collection) -> T where T : FloatingPointParameters
- predicted:
The predicted values.
- groundTruth:
The ground truth values. The collection must have same number of elements as the predicted values.
Return Value
The root mean squared error.
Discussion
Empty collections of predicted and ground truth values will return a value of NaN.