Internal API
Documentation for ComposableTuringIDModels's unexported internal helpers and supertypes. These are not part of the stable public API; they are documented because the public docstrings cross-reference them.
Index
ComposableTuringIDModels.ARStepComposableTuringIDModels.AbstractAccumulationStepComposableTuringIDModels.AbstractBroadcastRuleComposableTuringIDModels.AbstractConstantRenewalStepComposableTuringIDModels.AbstractIDMethodComposableTuringIDModels.AbstractIDOptMethodComposableTuringIDModels.AbstractIDSamplingMethodComposableTuringIDModels.ConstantRenewalStepComposableTuringIDModels.ConstantRenewalWithPopulationStepComposableTuringIDModels.LDStepComposableTuringIDModels.MAStepComposableTuringIDModels.RWStepComposableTuringIDModels.SafeIntValuedComposableTuringIDModels._expand_distComposableTuringIDModels.neg_MGFComposableTuringIDModels.remake_ode_problem
ComposableTuringIDModels.AbstractAccumulationStep Type
Abstract supertype for accumulation step structs used with accumulate_scan.
A concrete AbstractAccumulationStep is a callable (step)(state, ϵ) returning the next state. It is backend-agnostic: it contains no Turing/DynamicPPL machinery and is reused unchanged across model components (RandomWalk, AR, MA, LatentDelay).
ComposableTuringIDModels.AbstractBroadcastRule Type
Abstract supertype for broadcast rules used by BroadcastLatentModel. A rule defines broadcast_n (how long an inner series to generate) and broadcast_rule (how to expand it to length n).
ComposableTuringIDModels.AbstractConstantRenewalStep Type
Abstract supertype for renewal accumulation steps (constant generation interval, with or without susceptible depletion).
sourceComposableTuringIDModels.AbstractIDMethod Type
Abstract supertype for inference / generative-modelling methods.
sourceComposableTuringIDModels.AbstractIDOptMethod Type
Abstract supertype for optimisation-based methods (e.g. variational initialisation) used as a pre-sampler step.
sourceComposableTuringIDModels.AbstractIDSamplingMethod Type
Abstract supertype for sampling-based methods (e.g. NUTS).
sourceComposableTuringIDModels.ConstantRenewalStep Type
Renewal step with a constant generation interval (stored reversed).
ComposableTuringIDModels.ConstantRenewalWithPopulationStep Type
Renewal step with a constant generation interval and a fixed population (with susceptible depletion).
ComposableTuringIDModels.SafeIntValued Type
A value-support tag for real-valued count distributions whose eltype must stay integer-typed inside a Turing model even when rand is called.
ComposableTuringIDModels._expand_dist Function
Expand a vector of distributions into a single product distribution.
If every element of dist is equal, a filldist is returned for efficiency; otherwise an arraydist over the heterogeneous vector is returned.
ComposableTuringIDModels.neg_MGF Function
Negative moment generating function of a discrete generation interval w at rate r:
Arguments
r: the exponential growth rate.w: the discrete generation interval weights.
Examples
using ComposableTuringIDModels
ComposableTuringIDModels.neg_MGF(0.1, [0.2, 0.3, 0.5])ComposableTuringIDModels.remake_ode_problem Function
Rebuild an ODEProcess's ODEProblem with freshly sampled state u0 and parameters p.
This is the single seam through which ODEProcess re-instantiates its problem on every sample. The default applies the plain-vector remake(prob; u0, p) that the hand-coded SIRParams / SEIRParams problems expect.
Parameter models whose problem stores parameters differently — e.g. a ModelingToolkit/Catalyst-built problem carrying a structured MTKParameters object plus an initialization system — specialise this on their own type to inject the remake form they need. The Catalyst extension uses the plain-vector build_initializeprob = false path to bypass the init system (and stay reverse-mode differentiable). Dispatching on the parameter model keeps ODEProcess itself backend-agnostic.
Arguments
params: the ODE parameter model (theODEProcess'sparamsfield).prob: the templateODEProblemto rebuild.u0: the sampled initial state vector.p: the sampled parameter vector.