From 00a92f035763cc7f98975e14247b36e91d5e0bc9 Mon Sep 17 00:00:00 2001 From: seabbs-bot Date: Thu, 6 Aug 2026 11:07:32 +0100 Subject: [PATCH 1/3] docs: refresh package status and add ReparameterisedDistributions Promote ComposableTuringIDModels and ComposedDistributions to maturing (both are registered and installable on their 0.x lines), add the missing ReparameterisedDistributions entry (registered 0.2.0, maturing), and note convolve_series on CensoredDistributions. --- packages/index.qmd | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/index.qmd b/packages/index.qmd index cf16e30..867df1f 100644 --- a/packages/index.qmd +++ b/packages/index.qmd @@ -36,7 +36,7 @@ Status reflects where a package sits in its release cycle rather than a judgemen ComposableTuringIDModels.jl - experimental + maturing Assemble infectious disease models from interchangeable infection and observation parts as a single Turing model. The package that ties the ecosystem together. @@ -46,13 +46,13 @@ Status reflects where a package sits in its release cycle rather than a judgemen maturing - Handle the interval censoring and truncation biases common in epidemiological delay data, wrapping any Distributions.jl distribution. + Handle the interval censoring and truncation biases common in epidemiological delay data, wrapping any Distributions.jl distribution, and convolve series of censored delays with convolve_series. ComposedDistributions.jl - experimental + maturing Join the delays in a case's history into a single distribution that can simulate a case or be fitted to observed ones. @@ -72,6 +72,14 @@ Status reflects where a package sits in its release cycle rather than a judgemen Rescale, weight, modify hazards, or transform a distribution, while keeping the full Distributions.jl interface. + + + ReparameterisedDistributions.jl + + maturing + + Express the same distribution under a different, equivalent parameterisation, so a model can be fitted in whatever form is most convenient and read back in your own. + LoweredDistributions.jl From 636bf50f683fc331381c6a2c2d8ce1aef4613b49 Mon Sep 17 00:00:00 2001 From: seabbs-bot Date: Thu, 6 Aug 2026 11:29:24 +0100 Subject: [PATCH 2/3] docs: fix stale renewal example in the composable Turing models approach The prior snippet used the removed IDData wrapper, the old Renewal(data; ...) / initialisation_prior keywords, and HierarchicalNormal std_prior=. Rewrite to the current API (generation_time, initialisation, std=, Mooncake AD) and verify it builds, samples from the prior, and runs a real NUTS+Mooncake fit against the registered release. --- approaches/composable-turing-models.qmd | 42 ++++++++++++------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/approaches/composable-turing-models.qmd b/approaches/composable-turing-models.qmd index 9b00abc..7763793 100644 --- a/approaches/composable-turing-models.qmd +++ b/approaches/composable-turing-models.qmd @@ -75,28 +75,28 @@ page-layout: full ::: ```{.julia .code-overflow-scroll} -using ComposableTuringIDModels, Distributions, Turing - -# Renewal infections with an inline prior model -data = IDData(gen_distribution = Gamma(1.4, 1 / 0.38)) - -model = IDModel( - Renewal(data; - rt = AR(; ϵ_t = HierarchicalNormal( - std_prior = HalfNormal(0.1))), - initialisation_prior = Normal(log(1.0), 1.0)), - - # Multiple observation layers: - # delay → ascertainment → negative-binomial noise - LatentDelay( - Ascertainment( - NegativeBinomialError(), - Intercept(Normal(log(0.4), 0.1))), - truncated(Normal(5.0, 2.0), 0.0, Inf))) - -# Fit to case data with Turing's NUTS +using ComposableTuringIDModels, Distributions, Turing, Mooncake +using ADTypes: AutoMooncake + +# Renewal infections with an autoregressive log-R_t prior +renewal = Renewal(; + generation_time = Gamma(1.4, 1 / 0.38), # serial interval, discretised + rt = AR(; ϵ_t = HierarchicalNormal(std = HalfNormal(0.1))), + initialisation = Normal(log(1.0), 1.0)) + +# Observation layers: delay → ascertainment → negative-binomial noise +obs = LatentDelay( + Ascertainment( + NegativeBinomialError(), + Intercept(Normal(log(0.4), 0.1))), + truncated(Normal(5.0, 2.0), 0.0, Inf)) + +model = IDModel(renewal, obs) + +# Fit to case data with Turing's NUTS (Mooncake AD) chain = sample(as_turing_model(model, cases, length(cases)), - NUTS(), MCMCThreads(), 1_000, 2) + NUTS(0.95; adtype = AutoMooncake(; config = nothing)), + MCMCThreads(), 100, 2) ``` ::: From 7847874f3152c99b5d150fb2f30df85dacf2fcce Mon Sep 17 00:00:00 2001 From: seabbs-bot Date: Thu, 6 Aug 2026 12:23:48 +0100 Subject: [PATCH 3/3] docs: tidy approach pages - drop a stray comment in the composable Turing models example - point CensoredDistributions links at /dev/ (consistent with siblings) - shorten the DistributionsInference Where-next bullet to match the terse list style and avoid over-claiming for the experimental package --- approaches/composable-turing-models.qmd | 2 +- approaches/composed-distributions.qmd | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/approaches/composable-turing-models.qmd b/approaches/composable-turing-models.qmd index 7763793..cc8285b 100644 --- a/approaches/composable-turing-models.qmd +++ b/approaches/composable-turing-models.qmd @@ -80,7 +80,7 @@ using ADTypes: AutoMooncake # Renewal infections with an autoregressive log-R_t prior renewal = Renewal(; - generation_time = Gamma(1.4, 1 / 0.38), # serial interval, discretised + generation_time = Gamma(1.4, 1 / 0.38), rt = AR(; ϵ_t = HierarchicalNormal(std = HalfNormal(0.1))), initialisation = Normal(log(1.0), 1.0)) diff --git a/approaches/composed-distributions.qmd b/approaches/composed-distributions.qmd index fb53133..6906687 100644 --- a/approaches/composed-distributions.qmd +++ b/approaches/composed-distributions.qmd @@ -150,7 +150,7 @@ The model does not change, only the delays each case supplies. ### Censoring and modifiers compose as leaves Real line-list delays are rarely clean, and the corrections are part of the model rather than a preprocessing step. -[CensoredDistributions.jl](https://censoreddistributions.epiaware.org/) supplies censoring leaves for primary-event censoring, interval censoring, and truncation. +[CensoredDistributions.jl](https://censoreddistributions.epiaware.org/dev/) supplies censoring leaves for primary-event censoring, interval censoring, and truncation. [ModifiedDistributions.jl](https://modifieddistributions.epiaware.org/dev/) supplies modifier leaves that rescale, weight, or transform a delay. Both are leaves like any other, so they slot into the tree and the composers peel through them to reach the free delay underneath. @@ -187,18 +187,14 @@ Nothing is recomputed in separate post-processing that could drift from the mode - [ModifiedDistributions.jl](https://modifieddistributions.epiaware.org/dev/) lets you rescale, weight, or otherwise transform individual leaves without changing the tree structure. -- [CensoredDistributions.jl](https://censoreddistributions.epiaware.org/) adds +- [CensoredDistributions.jl](https://censoreddistributions.epiaware.org/dev/) adds the censoring layer for real line-list data. - [LoweredDistributions.jl](https://lowereddistributions.epiaware.org/dev/) lowers the same tree onto a phase-type chain or a CTMC, the bridge to compartmental models. -- Fitting outside Turing, or fitting a plain struct alongside a tree? - [DistributionsInference.jl](https://github.com/EpiAware/DistributionsInference.jl) - hosts the PPL-neutral log-density and readback that `as_logdensity` and - `as_turing` build on: `distribution_priors` assembles priors the same way - `param_priors` does for a tree, and `distribution_params` reads a fitted - chain back to the estimated values by name, whatever fittable object it - came from. +- [DistributionsInference.jl](https://github.com/EpiAware/DistributionsInference.jl) + assembles PPL-neutral priors and reads a fitted chain back by name, for + fitting the tree (or any fittable struct) outside Turing. - Ready to fit a full model with infection dynamics? See the [composable Turing models approach](composable-turing-models.qmd).