Description Usage Arguments Value
A simple quantile autoregressive forecaster based on quantgen
, to be used
with evalcast
, via evalcast::get_predictions()
. See the quantgen forecast vignette
for examples.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | quantgen_forecaster(
df_list,
forecast_date,
signals,
incidence_period,
ahead,
geo_type,
n = 4 * ifelse(incidence_period == "day", 7, 1),
lags = 0,
tau = modeltools::covidhub_probs,
transform = NULL,
inv_trans = NULL,
featurize = NULL,
noncross = FALSE,
noncross_points = c("all", "test", "train"),
cv_type = c("forward", "random"),
verbose = FALSE,
...
)
|
df_list |
List of data frames of signal values to use for forecasting, of the format
that is returned by |
forecast_date |
Date object or string of the form "YYYY-MM-DD",
indicating the date on which forecasts will be made. For example, if
|
signals |
Tibble with columns |
incidence_period |
One of "day or "epiweek", indicating the period over which forecasts are being made. Default is "day". |
ahead |
Vector of ahead values, indicating how many days/epiweeks ahead
to forecast. If |
n |
Size of the local training window (in days/weeks, depending on
|
lags |
Vector of lag values to use as features in the autoregressive
model. For example, when |
tau |
Vector of quantile levels for the probabilistic forecast. If not specified, defaults to the levels required by the COVID Forecast Hub. |
transform, inv_trans |
Transformation and inverse transformations to use
for the response/features. The former |
featurize |
Function to construct custom features before the quantile
model is fit. As input, this function must take a data frame with columns
|
noncross |
Should noncrossing constraints be applied? These force the
predicted quantiles to be properly ordered across all quantile levels being
considered. The default is |
noncross_points |
One of "all", "test", "train" indicating which points to use for the noncrossing constraints: the default "all" means to use both training and testing sets combined, while "test" or "train" means to use just one set, training or testing, respectively. |
cv_type |
One of "forward" or "random", indicating the type of
cross-validation to perform. If "random", then |
verbose |
Should progress be printed out to the console? Default is
|
... |
Additional arguments. Any parameter accepted by
|
Data frame with columns ahead
, geo_value
, quantile
, and
value
. The quantile
column gives the probabilities associated with
quantile forecasts for that location and ahead.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.