Getting started
LoweredDistributions maps a delay distribution onto the dynamical system it is equivalent to. A Gamma(3, 1.5) waiting time is also three exponential compartments in series; lower is the bridge between the two views, and four package extensions turn the result into the object a simulation or inference backend wants. This page is the quickstart; the tutorial takes one distribution through every backend.
Installation
using Pkg
Pkg.add("LoweredDistributions")Load the package:
using LoweredDistributionsA first example
lower is the package's entry point.
using LoweredDistributions, Distributions
lower(Gamma(3.0, 1.5))ErlangChain(3 compartments)A Gamma(3, 1.5) delay is exactly three exponential compartments in series, each left at rate 1/1.5, so it lowers to an ErlangChain. An Exponential is memoryless, so it lowers to a two-state CTMC instead, and a distribution with no exact chain representation is fitted by matching its first two moments (see phase_type).
Every phase-type lowering converts to the canonical PhaseType(α, S) view, which is the single shape the backends consume.
PhaseType(lower(Gamma(3.0, 1.5))).S3×3 Matrix{Float64}:
-0.666667 0.666667 0.0
0.0 -0.666667 0.666667
0.0 0.0 -0.666667Which backend do I want?
Four package extensions turn any lowering into a backend object: SciMLBase (ode_problem), Catalyst (reaction_system), JumpProcesses (jump_problem), and AlgebraicPetri (petri_net); loading the backend package activates the matching extension. Lowering a distribution to a dynamical system runs all four on the same delay and checks each against the distribution it came from.
Learning more
Want the full interface? See the Public API.
Want the packages LoweredDistributions works alongside? See Related packages on the home page.
Getting help
For usage questions, ask on the Julia Discourse (the SciML or usage categories) or the epinowcast community forum, our home for epidemiological modelling questions. Please use GitHub issues for bug reports and feature requests only.