Description Usage Arguments Value Examples
mape
takes actual and forecast numeric vectors and returns a
numeric vector where forecast is subtracted from the actual and
then those errors are divided by the actuals, the
absolute value of those percent errors are then taken, and lastly,
the mean of those absolute percent errors are taken.
1 2 |
y_true |
Ground truth (correct) target values. |
y_pred |
Estimated target values. |
actual |
a numeric vector of actuals. |
forecast |
a numeric vector of forecasts. |
na.rm |
a logical value indicating whether |
... |
additional arguments to be passed to mean() |
a numeric vector of length one: the mean of of absolute percent errors.
1 2 | # Examples
mape(1:100, 100:1)
|
[1] 3.849143
Warning messages:
1: In mape(1:100, 100:1) :
'mape' is deprecated. Use 'mean_absolute_percent_error' instead.
2: In ape(actual, forecast) :
'ape' is deprecated. Use 'absolute_percent_error' instead.
3: In pe(actual, forecast) :
'pe' is deprecated. Use 'percent_error' instead.
4: In e(actual, forecast) :
'e' is deprecated. Use 'absolute_error' instead.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.