powered by
Calculate absolute error as
$$ \textrm{abs}(\textrm{true\_value} - \textrm{median\_prediction}) $$
abs_error(true_values, predictions)
vector with the absolute error
A vector with the true observed values of size n
numeric vector with predictions, corresponding to the quantiles in a second vector, quantiles.
quantiles
ae_median_sample(), ae_median_quantile()
ae_median_sample()
ae_median_quantile()
true_values <- rnorm(30, mean = 1:30) predicted_values <- rnorm(30, mean = 1:30) abs_error(true_values, predicted_values)
Run the code above in your browser using DataLab