duration.mape
duration: E = mape (F, A)
duration: E = mape (F, A, dim)
duration: E = mape (F, A, vecdim)
duration: E = mape (F, A, 'all')
duration: E = mape (…, nanflag)
duration: E = mape (…, zeroflag)
duration: E = mape (…, 'Weights', W)
Compute the mean absolute percentage error between duration arrays.
This method overloads the core mape function for duration arrays.
The functionality is identical to core mape function.
Type help mape for more information.
Note that MAPE is expressed as a percentage. Thus, the returned argument is a numeric array of double type and not a duration array. However, both F and A must be duration arrays.
Source Code: duration
mape returns the mean absolute percentage error between two duration arrays. Being a ratio it is dimensionless — a plain percentage number.
predicted = hours ([1, 2, 4])
predicted =
1x3 duration array
1 hr 2 hr 4 hr
actual = hours ([1, 2, 3])
actual =
1x3 duration array
1 hr 2 hr 3 hr
mape (predicted, actual)
ans = 11.111