ae_median_quantile: Absolute error of the median (quantile-based version)
Description
Compute the absolute error of the median calculated as
$$
|\text{observed} - \text{median prediction}|
$$
The median prediction is the predicted value for which quantile_level == 0.5.
The function requires 0.5 to be among the quantile levels in quantile_level.
Numeric vector of length N with the absolute error of the median.
Arguments
observed
Numeric vector of size n with the observed values.
predicted
Numeric nxN matrix of predictive
quantiles, n (number of rows) being the number of forecasts (corresponding
to the number of observed values) and N
(number of columns) the number of quantiles per forecast.
If observed is just a single number, then predicted can just be a
vector of size N.
quantile_level
Vector of of size N with the quantile levels
for which predictions were made.
Input format
Overview of required input format for quantile-based forecasts