Questions tagged [mape]

The Mean Absolute Percentage Error (MAPE) is a point forecast accuracy measure. As a percentage, it can be compared between forecasts for time series on different scales, and it is easily interpreted. However, it is asymmetric (underforecasts' MAPEs are bounded at 100%, while overforecasts' are unbounded), potentially leading to biased forecasts. The MAPE is undefined if any actual is zero.

For forecasts $\hat{y}_1, \dots, \hat{y}_N$ and corresponding actuals $y_1, \dots, y_N >0$, the MAPE is defined as

$$\text{MAPE} := \frac{1}{N}\sum_{i=1}^N\frac{|\hat{y}_i-y_i|}{y_i}.$$

The MAPE is typically expressed as a percentage.

The MAPE has some shortcomings that should be kept in mind.

Variants on the MAPE (Tashman & Green, 2009, Foresight) include using the forecast instead of the actual in the denominator, or using the average of the forecast and the actual, yielding the so-called "symmetric MAPE" (sMAPE), which has a different kind of asymmetry (Goodwin & Lawton, 1999, IJF).

Alternatives to the MAPE as a point forecast accuracy measure include the , the and the .

91 questions
69
votes
1 answer

What are the shortcomings of the Mean Absolute Percentage Error (MAPE)?

The Mean Absolute Percentage Error (mape) is a common accuracy or error measure for time series or other predictions, $$ \text{MAPE} = \frac{100}{n}\sum_{t=1}^n\frac{|A_t-F_t|}{A_t}\%,$$ where $A_t$ are actuals and $F_t$ corresponding forecasts or…
Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357
43
votes
2 answers

Mean absolute percentage error (MAPE) in Scikit-learn

How can we calculate the Mean absolute percentage error (MAPE) of our predictions using Python and scikit-learn? From the docs, we have only these 4 metric functions for Regressions: metrics.explained_variance_score(y_true,…
Nyxynyx
  • 885
  • 3
  • 9
  • 15
36
votes
1 answer

"Frequency" value for seconds/minutes intervals data in R

I'm using R(3.1.1), and ARIMA models for forecasting. I would like to know what should be the "frequency" parameter, which is assigned in the ts() function, if im using time series data which is: separated by minutes and is spread over 180 days…
Apython
  • 625
  • 2
  • 7
  • 7
11
votes
2 answers

The difference between MSE and MAPE

i was wondering what is the differences between Mean Squared Error (MSE) and Mean Absolute Percentage Error (MAPE) in determining the accuracy of a forecast? Which one is better? Thanks
rendra
  • 111
  • 1
  • 1
  • 3
10
votes
2 answers

Best way to optimize MAPE

The MAPE is a metric that can be used for regression problems : $$\mbox{MAPE} = \frac{1}{n}\sum_{t=1}^n \left|\frac{A_t-F_t}{A_t}\right|$$ Where $A$ represents the actual value and $F$ the the forecast. I have to optimize my models with respect to…
RUser4512
  • 9,226
  • 5
  • 29
  • 59
10
votes
1 answer

Minimizing symmetric mean absolute percentage error (SMAPE)

I am working on a forecasting application in which forecast errors are measured using the symmetric mean absolute percentage error: $$ SMAPE = \frac{1}{n} \sum\limits_{t=1}^n{\frac{|F_t - A_t|}{F_t + A_t}} $$ After creating my ML model and applying…
Rui Gonçalves
  • 261
  • 1
  • 2
  • 9
9
votes
1 answer

How do I decide when to use MAPE, SMAPE and MASE for time series analysis on stock forecasting

My task is to forecast future 1 month stock required for retail store, at a daily basis. How do I decide whether MAPE, SMAPE and MASE is a good metrics for the scenario? In my context, over-forecast is better than under-forecast.
william007
  • 897
  • 1
  • 6
  • 9
9
votes
1 answer

Is MAPE a good error measurement statistic? And what alternatives are there?

I have a time series that deals with rainfall. It is a period of 10 years (daily resolution), and covers climate variables. I'm going to feed the data into an Artificial Neural Network to predict the rainfall variable (PP). As what I've been…
ace_01S
  • 295
  • 1
  • 2
  • 9
7
votes
1 answer

MAPE vs R-squared in regression models

Usually regression models are evaluated using $R^2$. I understand this metric can be misleading too at times but as far as I understand the first parameter we look at is $R^2$. There is another parameter which is often used and it is $MAPE$. Both…
PagMax
  • 171
  • 1
  • 1
  • 6
6
votes
2 answers

What is the best point forecast for lognormally distributed data?

I believe that the values I am forecasting are lognormally distributed with log-mean $\mu$ and log-variance $\sigma^2$. I need a point forecast (i.e., a one-number summary) that minimizes the expected error. What point forecast does so, if my error…
Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357
6
votes
1 answer

Gradient and hessian of the MAPE

I want to use MAPE(Mean Absolute Percentage Error) as my loss function. def mape(y, y_pred): grad = <<<>>> hess = <<<>>> return grad, hess Can someone help me understand the hessian and gradient for MAPE as a loss function? We need to…
Arc
  • 235
  • 2
  • 6
6
votes
2 answers

Difference between forecasting accuracy and forecasting error?

I am working on a demand forecasting project and I am puzzled by the client's standards of forecast evaluation. The MAPE (Mean Absolute Percentage Error) with the sample data Forecast = 300 and Demand = 100 is $$ \text{MAPE}…
HOSS_JFL
  • 417
  • 3
  • 11
6
votes
1 answer

Calculating MAPE

Is the below calculation of the Mean Absolute Percentage Error MAPE correct? I've included a workable example, but really the lines in question are these: result <- (((actual-predicted)/actual)-1)*100 result.mean <- rowMeans(result, na.rm =…
youjustreadthis
  • 683
  • 3
  • 7
  • 17
5
votes
1 answer

Which is the best accuracy measuring criteria among rmse, mae & mape?

I have created training set and test set from my data. Then I performed auto.arima() and ets() in R on the training set to predict one-step ahead forecasts. These were then compared with the test set values to measure error, namely RMSE, MAPE &…
priyaj
  • 121
  • 2
  • 3
  • 5
5
votes
2 answers

RMSE or MAPE? which one to choose for accuracy?

I have a weekly times series for which I would like to find the best fit model. So far I've tried arima, Harmonic regression with arima error, neural network and in the end I would like to decide which one has been better fitted to my raw data. The…
1
2 3 4 5 6 7