ae_median_sample: Absolute Error of the Median (Sample-based Version)

View source: R/metrics_point_forecasts.R

ae_median_sampleR Documentation

Absolute Error of the Median (Sample-based Version)

Description

Absolute error of the median calculated as

abs(true_value - median_prediction)

Usage

ae_median_sample(true_values, predictions)

Arguments

true_values

A vector with the true observed values of size n

predictions

nxN matrix of predictive samples, n (number of rows) being the number of data points and N (number of columns) the number of Monte Carlo samples. Alternatively, predictions can just be a vector of size n.

Value

vector with the scoring values

See Also

ae_median_quantile(), abs_error()

Examples

true_values <- rnorm(30, mean = 1:30)
predicted_values <- rnorm(30, mean = 1:30)
ae_median_sample(true_values, predicted_values)

scoringutils documentation built on May 14, 2022, 1:06 a.m.