Skip to contents

Measure of average magnitude‐weighted directional accuracy in forecast tasks.

Details

$$ \mathrm{MDV} = \frac{1}{n-1} \sum_{i=2}^n \lvert y_i - y_{i-1}\rvert \times \begin{cases} +1, & \text{if }\mathrm{sign}(y_i - y_{i-1}) = \mathrm{sign}(\hat y_i - y_{i-1}),\\ -1, & \text{otherwise.} \end{cases} $$ where n is the number of observations.

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.mdv")
msr("fcst.mdv")

Task type

Forecast measures are registered with task_type = "regr" so they compose with the standard regression measures (e.g. mlr3::mlr_measures_regr.rmse) on the mlr3::PredictionRegr that forecast learners produce. List them via the key prefix, not the task type, as the latter returns nothing:

as.data.table(mlr_measures)[grepl("^fcst", key)]

Meta Information

  • Task type: “regr”

  • Range: \((-\infty, \infty)\)

  • Minimize: FALSE

  • Average: macro

  • Required Prediction: “response”

  • Required Packages: mlr3, mlr3forecast

Parameters

Empty ParamSet

References

Blaskowitz O, Herwartz H (2011). “On economic evaluation of directional forecasts.” International Journal of Forecasting, 27(4), 1058–1065.

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.mpe, mlr_measures_fcst.msis, mlr_measures_fcst.pinball, mlr_measures_fcst.rmsse, mlr_measures_fcst.wape, mlr_measures_fcst.winkler

Super classes

mlr3::Measure -> mlr3::MeasureRegr -> MeasureMDV

Methods

Inherited methods


MeasureMDV$new()

Creates a new instance of this R6 class.

Usage


MeasureMDV$clone()

The objects of this class are cloneable with this method.

Usage

MeasureMDV$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.