title: forecasr accuracy - MAPE and zero values
body: <p>Hy guys, after a process of forecasting of time series, I've obtained a data frame (df) that is like this (numbers are only examples):</p>
  
  <pre><code>fcast_mean | actual_values
  12,5       | 12,3
  1,1        | 0
  24,3       | 22,7
  29,6       | 30,4
  ...        | ...
  </code></pre>
  
  <p>I know that MAPE is infinite if actual_value is zero and this is my situation!
  My question is: Is it mathematically wrong to put 0 instead of Inf in the row (in this case the 2nd row) where <code>abs(actual_values - fcast$mean)/abs(actual_values)</code> is equal to <code>Inf</code>?
  What are the consequences of this change for the calculation of MAPE? 
  It becomes no longer a reliable indicator for the accuracy of forecasting?</p>
  
  <p>My part of R code for the MAPE is:</p>
  
  <pre><code>x &lt;- abs(df$actual_values-df$fcast_mean)/abs(df$actual_values)
  x[is.infinite(x)] &lt;- 0
  MAPE &lt;- (1/nrow(df$actual_values))*(sum(x))*100
  </code></pre>