| ensemble_forecasts | R Documentation |
Averages (simple or inverse-error-weighted) several already-fit models'
forecasts – no re-fitting. Models that don't share every ds are
handled by renormalizing weights per-row over whichever models actually
have a value there.
ensemble_forecasts(
forecasts,
method = c("mean", "inverse_error"),
errors = NULL
)
forecasts |
A named list of |
method |
|
errors |
Required for |
A tibble with columns ds and yhat – the combined forecast.
ds <- as.Date("2024-01-01") + 0:2
forecasts <- list(
A = tibble::tibble(ds = ds, yhat = c(10, 10, 10)),
B = tibble::tibble(ds = ds, yhat = c(20, 20, 20))
)
ensemble_forecasts(forecasts, method = "mean")
ensemble_forecasts(forecasts, method = "inverse_error", errors = list(A = 1, B = 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.