Skip to contents

Simple forecasters

Complete forecasters that produce reasonable baselines

arx_forecaster()
Direct autoregressive forecaster with covariates
cdc_baseline_forecaster()
Predict the future with the most recent value
climatological_forecaster()
Climatological forecaster
flatline_forecaster()
Predict the future with today's value
arx_classifier()
Direct autoregressive classifier with covariates

Forecaster modifications

Constructors to modify forecaster arguments and utilities to produce epi_workflow objects

arx_args_list()
ARX forecaster argument constructor
arx_class_args_list()
ARX classifier argument constructor
cdc_baseline_args_list()
CDC baseline forecaster argument constructor
climate_args_list()
Climatological forecaster argument constructor
flatline_args_list()
Flatline forecaster argument constructor
arx_class_epi_workflow()
Create a template arx_classifier workflow
arx_fcast_epi_workflow()
Create a template arx_forecaster workflow

Steps and Layers

Epi recipe preprocessing steps

Note that any recipes step is also valid

step_adjust_latency()
Adapt the model to latent data
step_climate()
Calculate a climatological variable based on the history
step_epi_naomit()
Unified NA omission wrapper function for recipes
step_epi_lag() step_epi_ahead()
Create a shifted predictor
step_epi_slide()
Calculate a rolling window transformation
step_growth_rate()
Calculate a growth rate
step_lag_difference()
Calculate a lagged difference
step_population_scaling()
Convert raw scale predictions to per-capita
step_training_window()
Limits the size of the training window to the most recent observations

Frosting post-processing layers

layer_add_forecast_date()
Post-processing step to add the forecast date
layer_add_target_date()
Post-processing step to add the target date
layer_cdc_flatline_quantiles()
CDC Flatline Forecast Quantiles
layer_naomit()
Omit NAs from predictions or other columns
layer_point_from_distn()
Converts distributional forecasts to point forecasts
layer_population_scaling()
Convert per-capita predictions to raw scale
layer_predict()
Prediction layer for post-processing
layer_predictive_distn() deprecated
Returns predictive distributions
layer_quantile_distn()
Returns predictive quantiles
layer_residual_quantiles()
Creates predictions based on residual quantiles
layer_threshold()
Lower and upper thresholds for predicted values
layer_unnest()
Unnest prediction list-cols

Epiworkflows

Basic forecasting workflow functions

epi_recipe()
Create a epi_recipe for preprocessing data
epi_workflow()
Create an epi_workflow
add_epi_recipe() remove_epi_recipe() update_epi_recipe()
Given an epi_recipe, add it to, remove it from, or update it in an epi_workflow
fit(<epi_workflow>)
Fit an epi_workflow object

Forecast post-processing workflow functions

Create and apply series of post-processing operations

frosting()
Create frosting for post-processing predictions
add_frosting() remove_frosting() update_frosting()
Given a frosting(), add it to, remove it from, or update it in an epi_workflow
adjust_frosting()
Adjust a layer in an epi_workflow or frosting
apply_frosting()
Apply post-processing to a fitted workflow
extract_frosting()
Extract the frosting object from a workflow
tidy(<frosting>)
Tidy the result of a frosting object
slather()
Spread a layer of frosting on a fitted workflow

Prediction

Methods for prediction and modifying predictions

predict(<epi_workflow>)
Predict from an epi_workflow
augment(<epi_workflow>)
Augment data with predictions
get_test_data()
Get test data for prediction based on longest lag period
forecast(<epi_workflow>)
Produce a forecast from just an epi workflow

Modifying forecasting epiworkflows

Modify or inspect an existing recipe, workflow, or frosting. See also the article on the topic

adjust_epi_recipe()
Adjust a step in an epi_workflow or epi_recipe
Add_model() Remove_model() Update_model() add_model() remove_model() update_model()
Add a model to an epi_workflow
add_layer()
Add layer to a frosting object
extract_layers() is_layer() validate_layer() detect_layer()
Extract, validate, or detect layers of frosting
update(<layer>)
Update post-processing layer

Automatic forecast visualization

autoplot(<epi_workflow>) autoplot(<canned_epipred>)
Automatically plot an epi_workflow or canned_epipred object

Parsnip engines

Prediction methods not available in the general parsnip repository

quantile_reg()
Quantile regression
smooth_quantile_reg()
Smooth quantile regression
grf_quantiles
Random quantile forests via grf

Utilities

flusight_hub_formatter()
Format predictions for submission to FluSight forecast Hub
clean_f_name()
Create short function names
check_enough_train_data()
Check the dataset contains enough data points.

Utilities for quantile distribution processing

dist_quantiles() deprecated
A distribution parameterized by a set of quantiles
quantile(<quantile_pred>)
Quantiles from a distribution
extrapolate_quantiles()
Extrapolate the quantiles to new quantile levels
nested_quantiles() deprecated
Turn a vector of quantile distributions into a list-col
weighted_interval_score()
Compute weighted interval score
pivot_quantiles_longer()
Pivot a column containing quantile_pred longer
pivot_quantiles_wider()
Pivot a column containing quantile_pred wider