calculateMAPE: MAPE accuracy tables and plots

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

View source: R/calculateMAPE.R

Description

Generates MAPE accuracy tables and plots.

Usage

1
calculateMAPE(af, sort = FALSE, digits = 2)

Arguments

af

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

sort

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

digits

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

Details

Calculates MAPEs 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 MAPE

rank:

dataframe with MAPE ranks

plot:

ggplot2 object showing accuracy vs horizon for MAPE

Author(s)

Cuong Sai, Andrey Davydenko, and Maxim Shcherbakov.

See Also

calculateAvgRelMAE, calculateSMAPE, calculateMASE

Examples

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

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