| compute_forecast_bias | R Documentation |
MASE/sMAPE/RMSE are all magnitude-only, so a model that's consistently
over- or under-forecasting can still look "fine" on those alone. This
surfaces the signed error directly. Generic across every registered
model – only needs fc_tib's ds/yhat and test_df's ds/y.
compute_forecast_bias(fc_tib, test_df)
fc_tib |
A tibble with |
test_df |
A tibble with |
A list with bias (mean signed error, y - yhat), pct_bias
(bias as a percentage of mean |y|), and n. All NA/0 if there's
no overlap.
ds <- as.Date("2024-01-01") + 0:4
fc_tib <- tibble::tibble(ds = ds, yhat = rep(8, 5))
test_df <- tibble::tibble(ds = ds, y = rep(10, 5))
compute_forecast_bias(fc_tib, test_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.