Internal Documentation
Documentation for EpInference.jl
's internal interface.
Contents
Index
EpiAware.EpiAwareBase._apply_method
EpiAware.EpiAwareBase._apply_method
EpiAware.EpiInference._apply_nuts
EpiAware.EpiInference._apply_nuts
EpiAware.EpiInference._continue_manypathfinder!
EpiAware.EpiInference._get_best_elbo_pathfinder
EpiAware.EpiInference._run_manypathfinder
Internal API
EpiAware.EpiAwareBase._apply_method
— Function_apply_method(
model::DynamicPPL.Model,
method::NUTSampler;
...
) -> Any
_apply_method(
model::DynamicPPL.Model,
method::NUTSampler,
prev_result;
kwargs...
) -> Any
Apply NUTS sampling to a DynamicPPL.Model
object with prev_result
representing any initial results to use for sampler initialisation.
EpiAware.EpiAwareBase._apply_method
— Function_apply_method(
model::DynamicPPL.Model,
method::ManyPathfinder;
...
) -> Any
_apply_method(
model::DynamicPPL.Model,
method::ManyPathfinder,
prev_result;
kwargs...
) -> Any
Apply a ManyPathfinder
method to a DynamicPPL.Model
object.
If prev_result
is a vector of real numbers, then the ManyPathfinder
method is applied with the initial values set to prev_result
. Otherwise, the ManyPathfinder
method is run with default initial values generated.
EpiAware.EpiInference._apply_nuts
— Method_apply_nuts(model, method, prev_result; kwargs...) -> Any
No initialisation NUTS.
EpiAware.EpiInference._apply_nuts
— Method_apply_nuts(
model,
method,
prev_result::Pathfinder.PathfinderResult;
kwargs...
) -> Any
Initialise NUTS with initial parameters from a Pathfinder result.
EpiAware.EpiInference._continue_manypathfinder!
— Method_continue_manypathfinder!(
pfs,
mdl::DynamicPPL.Model;
max_tries,
nruns,
kwargs...
)
Continue running the pathfinder algorithm until a pathfinder succeeds or the maximum number of tries is reached.
Arguments
pfs
: An array of pathfinder objects.mdl::DynamicPPL.Model
: The model to perform inference on.max_tries
: The maximum number of tries to run the pathfinder algorithm. Default isInf
.nruns
: The number of times to run thepathfinder
function.kwargs...
: Additional keyword arguments passed topathfinder
.
Returns
pfs
: The updated array of pathfinder objects.
EpiAware.EpiInference._get_best_elbo_pathfinder
— Method_get_best_elbo_pathfinder(pfs) -> Any
Selects the pathfinder with the highest ELBO estimate from a list of pathfinders.
Arguments
pfs
: A list of pathfinders results orSymbol
values indicating failure.
Returns
The pathfinder with the highest ELBO estimate.
EpiAware.EpiInference._run_manypathfinder
— Method_run_manypathfinder(mdl::DynamicPPL.Model; nruns, kwargs...)
Run pathfinder multiple times and store the results in an array. Fails safely.
Arguments
mdl::DynamicPPL.Model
: TheTuring
model to be used for inference.nruns
: The number of times to run thepathfinder
function.kwargs...
: Additional keyword arguments passed topathfinder
.
Returns
An array of PathfinderResult
objects or Symbol
values indicating success or failure.