View source: R/metrics_point_forecasts.R
abs_error | R Documentation |
Calculate absolute error as
abs(true_value - prediction)
abs_error(true_values, predictions)
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, |
vector with the absolute error
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.