mape

typhon.retrieval.scores.mape(y_pred, y_test)[source]

The Mean Absolute Percentage Error (MAPE)

The MAPE is computed as the mean of the absolute value of the relative error in percent, i.e.:

MAPE(y,ytrue)=100%ni=0n|ypred,iytrue,i||ytrue,i|
Parameters:
  • y_pred (numpy.array) – The predicted scalar values.

  • y_test (numpy.array) – The true values.

Returns:

The MAPE for the given predictions.