Public Documentation
Documentation for EpiInference.jl
's public interface.
See the Internals section of the manual for internal package docs covering all submodules.
Contents
Index
EpiAware.EpiInference
EpiAware.EpiInference.ManyPathfinder
EpiAware.EpiInference.NUTSampler
EpiAware.EpiInference.manypathfinder
Public API
EpiAware.EpiInference
— ModuleModule for defining inference methods.
EpiAware.EpiInference.ManyPathfinder
— Typestruct ManyPathfinder <: AbstractEpiOptMethod
A variational inference method that runs manypathfinder
.
Fields
ndraws::Int64
: Number of draws per pathfinder run.nruns::Int64
: Number of many pathfinder runs.maxiters::Int64
: Maximum number of optimization iterations for each run.max_tries::Int64
: Maximum number of tries if all runs fail.
EpiAware.EpiInference.NUTSampler
— Typestruct NUTSampler{A<:ADTypes.AbstractADType, E<:AbstractMCMC.AbstractMCMCEnsemble, M} <: AbstractEpiSamplingMethod
A NUTS method for sampling from a DynamicPPL.Model
object.
The NUTSampler
struct represents using the No-U-Turn Sampler (NUTS) to sample from the distribution defined by a DynamicPPL.Model
.
Fields
target_acceptance::Float64
: The target acceptance rate for the sampler.adtype::ADTypes.AbstractADType
: The automatic differentiation type used for computing gradients.mcmc_parallel::AbstractMCMC.AbstractMCMCEnsemble
: The parallelization strategy for the MCMC sampler.nchains::Int64
: The number of MCMC chains to run.max_depth::Int64
: Tree depth limit for the NUTS sampler.Δ_max::Float64
: Divergence threshold for the NUTS sampler.init_ϵ::Float64
: The initial step size for the NUTS sampler.ndraws::Int64
: The number of samples to draw from each chain.metricT::Any
: The metric type to use for the HMC sampler.nadapts::Int64
: number of adaptation steps
EpiAware.EpiInference.manypathfinder
— Methodmanypathfinder(
mdl::DynamicPPL.Model,
ndraws;
nruns,
maxiters,
max_tries,
kwargs...
) -> Any
Run multiple instances of the pathfinder algorithm and returns the pathfinder run with the largest ELBO estimate.
Arguments
mdl::DynamicPPL.Model
: The model to perform inference on.nruns::Int
: The number of pathfinder runs to perform.ndraws::Int
: The number of draws per pathfinder run, readjusted to be at least as large as the number of chains.nchains::Int
: The number of chains that will be initialised by pathfinder draws.maxiters::Int
: The maximum number of optimizer iterations per pathfinder run.max_tries::Int
: The maximum number of extra tries to find a valid pathfinder result.kwargs...
: Additional keyword arguments passed topathfinder
.
Returns
best_pfs::PathfinderResult
: Best pathfinder result by estimated ELBO.