meanAbsolutePercentageError(_:)
Computes the mean absolute percentage error between predicted and ground truth values.
Declaration
func meanAbsolutePercentageError<T>(_ annotatedPredictions: [AnnotatedPrediction<T, T>]) -> T where T : FloatingPointParameters
- annotatedPredictions:
An
AnnotatedPredictionobject.
Return Value
The mean absolute percentage error as a decimal value.
Discussion
If an empty AnnotatedPrediction is supplied, the result will be NaN.