Internal Documentation
Documentation for EpiObsModels.jl
's internal interface.
Contents
Index
EpiAware.EpiObsModels.LDStep
EpiAware.EpiObsModels.LDStep
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareBase.generate_observations
EpiAware.EpiAwareUtils.get_state
EpiAware.EpiObsModels.NegativeBinomialMeanClust
EpiAware.EpiObsModels.generate_observation_kernel
Internal API
EpiAware.EpiObsModels.LDStep
— Typestruct LDStep{D<:(AbstractVector{<:Real})} <: AbstractAccumulationStep
The LatentDelay step function struct
Fields
rev_pmf::AbstractVector{<:Real}
EpiAware.EpiObsModels.LDStep
— MethodThe LatentDelay step function method for accumulate_scan
.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs_model::AbstractTuringObservationErrorModel,
y_t,
Y_t
) -> Any
Generates observations from an observation error model. It provides support for missing values in observations (y_t
), and expected observations (Y_t
) that are shorter than observations. When this is the case it assumes that the expected observations are the last length(Y_t)
elements of y_t
. It also pads the expected observations with a small value (1e-6) to mitigate potential numerical issues.
It dispatches to the observation_error
function to generate the observation error distribution which uses priors generated by generate_observation_error_priors
submodel. For most observation error models specific implementations of observation_error
and generate_observation_error_priors
are required but a specific implementation of generate_observations
is not required.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs_model::Ascertainment,
y_t,
Y_t
) -> Any
Generates observations based on the LatentDelay
observation model.
Arguments
obs_model::Ascertainment
: The Ascertainment model.y_t
: The current state of the observations.Y_t
` : The expected observations.
Returns
y_t
: The updated observations.expected_aux
: Additional expected observation-related variables.obs_aux
: Additional observation-related variables.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs_model::LatentDelay,
y_t,
Y_t
) -> Any
Generates observations based on the LatentDelay
observation model.
Arguments
obs_model::LatentDelay
: TheLatentDelay
observation model.y_t
: The current observations.I_t
: The current infection indicator.
Returns
y_t
: The updated observations.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs_model::StackObservationModels,
y_t::NamedTuple,
Y_t::AbstractVector
) -> Any
Generate observations from a stack of observation models. Maps Y_t
to a NamedTuple
of the same length as y_t
assuming a 1 to many mapping.
Arguments
obs_model::StackObservationModels
: The stack of observation models.y_t::NamedTuple
: The observed values.Y_t::AbstractVector
: The expected values.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs_model::StackObservationModels,
y_t::NamedTuple,
Y_t::NamedTuple
) -> Any
Generate observations from a stack of observation models. Assumes a 1 to 1 mapping between y_t
and Y_t
.
Arguments
obs_model::StackObservationModels
: The stack of observation models.y_t::NamedTuple
: The observed values.Y_t::NamedTuple
: The expected values.
EpiAware.EpiAwareBase.generate_observations
— Methodgenerate_observations(
obs::TransformObservationModel,
y_t,
Y_t
) -> Any
Generates observations or accumulates log-likelihood based on the TransformObservationModel
.
Arguments
obs::TransformObservationModel
: The TransformObservationModel.y_t
: The current state of the observations.Y_t
: The expected observations.
Returns
y_t
: The updated observations.
EpiAware.EpiAwareUtils.get_state
— Methodget_state(
acc_step::EpiAware.EpiObsModels.LDStep,
initial_state,
state
) -> Any
The LatentDelay step function method for get_state.
EpiAware.EpiObsModels.NegativeBinomialMeanClust
— MethodNegativeBinomialMeanClust(μ, α) -> SafeNegativeBinomial
Compute the mean-cluster factor negative binomial distribution.
Arguments
μ
: The mean of the distribution.α
: The clustering factor parameter.
Returns
A NegativeBinomial
distribution object.
EpiAware.EpiObsModels.generate_observation_kernel
— Methodgenerate_observation_kernel(
delay_int,
time_horizon;
partial
) -> Any
Generate an observation kernel matrix based on the given delay interval and time horizon.
Arguments
delay_int::Vector{Float64}
: The delay PMF vector.time_horizon::Int
: The number of time steps of the observation period.partial::Bool
: Whether to generate a partial observation kernel matrix.
Returns
K::SparseMatrixCSC{Float64, Int}
: The observation kernel matrix.