Skip to contents

Measure of the total absolute error of forecasts as a percentage of the total absolute truth. It weights each error by the magnitude of the series, making it robust to individual observations close to zero where the ordinary percentage error is undefined.

Details

$$ \mathrm{WAPE} = 100 \cdot \frac{\sum_{i=1}^n \lvert y_i - \hat y_i \rvert}{\sum_{i=1}^n \lvert y_i \rvert} $$

Dictionary

This mlr3::Measure can be instantiated via the dictionary mlr3::mlr_measures or with the associated sugar function mlr3::msr():

mlr_measures$get("fcst.wape")
msr("fcst.wape")

Meta Information

  • Task type: “regr”

  • Range: \([0, \infty)\)

  • Minimize: TRUE

  • Average: macro

  • Required Prediction: “response”

  • Required Packages: mlr3, mlr3forecast

Parameters

Empty ParamSet

See also

Other Measure: mlr_measures_fcst.acf1, mlr_measures_fcst.coverage, mlr_measures_fcst.mase, mlr_measures_fcst.mda, mlr_measures_fcst.mdpv, mlr_measures_fcst.mdv, mlr_measures_fcst.mpe, mlr_measures_fcst.msis, mlr_measures_fcst.pinball, mlr_measures_fcst.rmsse, mlr_measures_fcst.winkler

Super classes

mlr3::Measure -> mlr3::MeasureRegr -> MeasureWAPE

Methods

Inherited methods


MeasureWAPE$new()

Creates a new instance of this R6 class.

Usage


MeasureWAPE$clone()

The objects of this class are cloneable with this method.

Usage

MeasureWAPE$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.