| compute_interval_coverage | R Documentation |
Whether a model's uncertainty bounds are honest, not just its point
forecast: what fraction of actuals actually fell inside
yhat_lower/yhat_upper, versus the interval's nominal confidence
level (Prophet and the forecast-package adapters default to an 80%
interval).
compute_interval_coverage(fc_tib, test_df, nominal_level = 0.8)
fc_tib |
A tibble with |
test_df |
A tibble with |
nominal_level |
Numeric, the interval's nominal confidence level.
Default |
A list with empirical_coverage, nominal_level, gap
(empirical_coverage - nominal_level), and n.
ds <- as.Date("2024-01-01") + 0:9
fc_tib <- tibble::tibble(ds = ds, yhat = 10, yhat_lower = 9, yhat_upper = 11)
test_df <- tibble::tibble(ds = ds, y = c(rep(10, 8), 20, 20))
compute_interval_coverage(fc_tib, test_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.