calculateAvgRelMAE: AvgRelMAE accuracy tables and plots

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/calculateAvgRelMAE.R

Description

Generates AvgRelMAE accuracy tables and plots.

Usage

1
calculateAvgRelMAE(af, bench, sort = FALSE, digits = 3)

Arguments

af

dataframe with forecast data formatted using the Actual and Forecast Table Schema (AFTS), use showAFTS() to display schema specification details.

bench

method_id for the benchmark method

sort

if TRUE, sorts accuracy results according to the average AvgRelMAE rank across all available horizons.

digits

number of digits after the dot used to output AvgRelMAE; if digits=NA, AvgRelMAEs and ranks are not rounded.

Details

Calculates AvgRelMAEs (Davydenko and Fildes, 2013) for each horizon and each method contained in af. Outputs accuracy tables and plots.

The input dataframe af can be created using createAFTS().

Value

a list with the following variables:

accuracy:

dataframe with accuracy table for AvgRelMAE

mae:

dataframe with MAEs, RelMAE, logRelMAE for each time series for each horizon

rank:

dataframe with AvgRelMAE ranks

plot:

ggplot2 object showing accuracy vs horizon for AvgRelMAE

boxplot:

ggplot2 object with boxplots showing logRelMAEs for each method

Author(s)

Cuong Sai, Andrey Davydenko, and Maxim Shcherbakov.

References

Davydenko, A., & Fildes, R. (2013). Measuring Forecasting Accuracy:The Case of Judgmental Adjustments to Sku-Level Demand Forecasts.International Journal of Forecasting, 29(3), 510-512.

Davydenko, A., & Fildes, R. (2016). Forecast Error Measures: Critical Review and Practical Recommendations. In Business Forecasting: Practical Problems and Solutions. John Wiley & Sons Inc.

See Also

calculateMAPE, calculateSMAPE, calculateMASE

Examples

1
2
3
4
5
af <- createAFTS(example1_ts, example1_fc)
acc <- calculateAvgRelMAE(af, "A")
acc$accuracy
acc$rank
acc$plot

forvis/forvision documentation built on April 30, 2020, 3:28 a.m.