Getting started
ComposableRecurrences builds discrete-time models from two operators. A Recurrence computes each value of a series from its own past values, as infections arise from earlier infections. A Convolution computes each value from the past values of another series, as reported cases follow infections after a delay. The home page states one model built from both and lists the related packages.
Reading order
Three towns, step by step builds the model of the home page one part at a time.
The API overview defines each concept of the package and links the page that covers it.
Time units covers data, parameters and delays in units other than the step of the model.
The tutorials each build one model, and the FAQ lists model features with the page that builds each.
Tutorials
Each tutorial builds one model, states its equations before its code and can be read alone after Three towns, step by step.
Transmission: a renewal process with depletion and a reporting delay (Renewal then delay), imported cases, the reproduction number from a run, latent processes driving the reproduction number and branching processes.
Populations and places: vaccination as flows between pools, and spatial models of places that mix.
Delays and reporting: the reporting triangle, case reproduction number and expected descendants, clinical outcomes, time-varying delays and kernels, occupancy and capacity and nowcasting.
Forecasting and fitting: forecasting by continuing a run, and conjugate estimation of the reproduction number.
Other sections
Operators, Shapes and couplings and Modifiers give the equations behind each concept.
Gradient rules, AD backends, executors and GPU arrays gives the code each AD backend, executor and array type runs.
Performance gives timings against hand-written loops and gradients.
Writing new types shows how to write a modifier, a coupling or a depletion form.
The Public API holds every docstring.
Extensions
An extension loads when its packages are loaded with ComposableRecurrences. No extension is needed to build or run a model.
| Load | Adds | Page |
|---|---|---|
Distributions | Discrete distributions as kernels | Distributions |
CensoredDistributions, Distributions | Continuous distributions as kernels | CensoredDistributions |
Enzyme | The rules of the operators for Enzyme | Enzyme |
Mooncake | The rules of the operators for Mooncake | Mooncake |
ADTypes, Enzyme, EnzymeTestUtils | test_adjoint for Enzyme | EnzymeTestUtils |
ADTypes, DifferentiationInterface | gradient_routes, the gradient time of a recurrence by route | DifferentiationInterface |
FFTW | Lag sums of a Convolution by fast Fourier transform | FFTW |
Functors | convert_floats, such as to Float32 | Functors |
LogExpFunctions | Derivatives of logistic, logit and log1pexp | LogExpFunctions |
KernelAbstractions | The Parallel executor | KernelAbstractions |
KernelAbstractions and a GPU array package | Calls on GPU arrays | GPUArrays |
Reactant | Compiled calls on traced arrays | Reactant |
Reactant, KernelAbstractions | Traced loops over strata as one kernel | Reactant kernels |
Getting help
Usage questions go to the Julia Discourse or the epinowcast community forum. Bug reports and feature requests go to GitHub issues.