I need to have a MAPE function, however I was not able to find it in standard packages ... Below, my implementation of this function.
def mape(actual, predic
Another similar way of doing it using masked_Arrays to mask division by zero is:
masked_Arrays
import numpy.ma as ma masked_actual = ma.masked_array(actual, mask=actual==0) MAPE = (np.fabs(masked_actual - predict)/masked_actual).mean()