View source: R/arx_classifier.R
arx_class_args_list | R Documentation |
Constructs a list of arguments for arx_classifier()
.
arx_class_args_list(
lags = c(0L, 7L, 14L),
ahead = 7L,
n_training = Inf,
forecast_date = NULL,
target_date = NULL,
adjust_latency = c("none", "extend_ahead", "extend_lags", "locf"),
warn_latency = TRUE,
outcome_transform = c("growth_rate", "lag_difference"),
breaks = 0.25,
horizon = 7L,
method = c("rel_change", "linear_reg"),
log_scale = FALSE,
check_enough_data_n = NULL,
check_enough_data_epi_keys = NULL,
...
)
lags |
Vector or List. Positive integers enumerating lags to use in autoregressive-type models (in days). By default, an unnamed list of lags will be set to correspond to the order of the predictors. |
ahead |
Integer. Number of time steps ahead (in days) of the forecast date for which forecasts should be produced. |
n_training |
Integer. An upper limit for the number of rows per
key that are used for training
(in the time unit of the |
forecast_date |
Date. The date from which the forecast is occurring.
The default
|
target_date |
Date. The date that is being forecast. The default |
adjust_latency |
Character. One of the
|
warn_latency |
by default, |
outcome_transform |
Scalar character. Whether the outcome should
be created using growth rates (as the predictors are) or lagged
differences. The second case is closer to the requirements for the
2022-23 CDC Flusight Hospitalization Experimental Target.
See the Classification Vignette for details of how to create a reasonable
baseline for this case. Selecting |
breaks |
Vector. A vector of breaks to turn real-valued growth rates
into discrete classes. The default gives binary upswing classification
as in McDonald, Bien, Green, Hu, et al..
This coincides with the default |
horizon |
Scalar integer. This is passed to the |
method |
Character. Options available for growth rate calculation. |
log_scale |
Scalar logical. Whether to compute growth rates on the log scale. |
check_enough_data_n |
Integer. A lower limit for the number of rows per
epi_key that are required for training. If |
check_enough_data_epi_keys |
Character vector. A character vector of column names on which to group the data and check threshold within each group. Useful if training per group (for example, per geo_value). |
... |
Space to handle future expansions (unused). |
A list containing updated parameter choices with class arx_clist
.
arx_class_args_list()
# 3-class classsification,
# also needs arx_classifier(trainer = parsnip::multinom_reg())
arx_class_args_list(breaks = c(-.2, .25))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.