abs_error {scoringutils}R Documentation

Absolute Error

Description

Calculate absolute error as

\textrm{abs}(\textrm{true\_value} - \textrm{median\_prediction})

Usage

abs_error(true_values, predictions)

Arguments

true_values

A vector with the true observed values of size n

predictions

numeric vector with predictions, corresponding to the quantiles in a second vector, quantiles.

Value

vector with the absolute error

See Also

ae_median_sample(), ae_median_quantile()

Examples

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

[Package scoringutils version 1.2.2 Index]