Documentation strings
Types
SequentialMonteCarlo.SMCModel — TypeSMCModel(M!::F1, lG::F2, maxn::Int64, particle::Type, pScratch::Type) where
{F1<:Function,F2<:Function}M!Mutation functionlGLog potential functionmaxnMaximum n for which the model is well-definedparticleType of a particlepScratchType of particle scratch space
SequentialMonteCarlo.SMCIO — TypeSMCIO{Particle, ParticleScratch}Structs of this type should be constructed using the provided constructor. Important fields:
N::Int64Number of particles $N$n::Int64Number of steps $n$nthreads::Int64Number of threadsfullOutput::BoolWhether particle system history should be recordedessThreshold::Float64Relative ESS Threshold $\tau$zetas::Vector{Particle}Time n particles $\zeta_n^1, \ldots, \zeta_n^N$eves::Vector{Int64}Time n Eve indices $E_n^1, \ldots, E_n^N$ws::Vector{Float64}Time n weights $W_n^1, \ldots, W_n^N$logZhats::Vector{Float64}$\log(\hat{Z}^N_1), \ldots, \log(\hat{Z}^N_n)$Vhat1s::Vector{Float64}$\hat{V}_1^N(1), \ldots, \hat{V}_n^N(1)$esses::Vector{Float64}Relative ESS values $\mathcal{E}_1^N, \ldots, \mathcal{E}_n^N$resample::Vector{Bool}Resampling indicators $R_1, \ldots, R_{n-1}$
Populated only if fullOutput == true
allZetas::Vector{Vector{Particle}}All the particlesallWs::Vector{Vector{Float64}}All the weightsallAs::Vector{Vector{Int64}}All the ancestor indicesallEves::Vector{Vector{Int64}}All the Eve indices
Functions
SequentialMonteCarlo.smc! — Methodsmc!(model::SMCModel, smcio::SMCIO)Run the SMC algorithm for the given model and input/output arguments.
If smcio.nthreads == 1 the algorithm will run in serial.
SequentialMonteCarlo.csmc! — Methodcsmc!(model::SMCModel, smcio::SMCIO, ref::Vector{Particle}, refout::Vector{Particle})Run the conditional SMC algorithm for the given model, input/output arguments, reference path and output path.
It is permitted for ref and refout to be the same. If smcio.nthreads == 1 the algorithm will run in serial.
SequentialMonteCarlo.SMCIO — MethodSMCIO{Particle, ParticleScratch}(N::Int64, n::Int64, nthreads::Int64,
fullOutput::Bool, essThreshold::Float64 = 2.0) where
{Particle, ParticleScratch}Constructor for SMCIO structs.
SequentialMonteCarlo.eta — Methodeta(smcio::SMCIO{Particle}, f::F, hat::Bool, p::Int64) where {Particle, F<:Function}Compute:
!hat: $\eta^N_p(f)$hat: $\hat{\eta}_p^N(f)$
SequentialMonteCarlo.allEtas — MethodallEtas(smcio::SMCIO, f::F, hat::Bool) where F<:FunctionCompute eta(smcio::SMCIO, f::F, hat::Bool, p) for p in {1, …, smcio.n}
SequentialMonteCarlo.slgamma — Methodslgamma(smcio::SMCIO, f::F, hat::Bool, p::Int64) where {Particle, F<:Function}Compute:
!hat: $(\eta^N_p(f) \geq 0, \log |\gamma^N_p(f)|)$hat: $(\hat{\eta}^N_p(f) \geq 0, \log |\hat{\gamma}_p^N(f)|)$
The result is returned as a Tuple{Bool, Float64}: the first component represents whether the returned value is non-negative, the second is the logarithm of the absolute value of the approximation.
SequentialMonteCarlo.allGammas — MethodallGammas(smcio::SMCIO, f::F, hat::Bool) where F<:FunctionCompute slgamma(smcio::SMCIO, f::F, hat::Bool, p) for p in {1, …, smcio.n}
SequentialMonteCarlo.V — MethodV(smcio::SMCIO{Particle}, f::F, hat::Bool, centred::Bool, p::Int64) where
{Particle, F<:Function}Compute:
!hat & !centred: $V^N_p(f)$!hat & centred: $V^N_p(f-\eta_p^N(f))$hat & !centred: $\hat{V}_p^N(f)$hat & centred: $\hat{V}_p^N(f-\hat{\eta}_p^N(f))$
SequentialMonteCarlo.vpns — Methodvpns(smcio::SMCIO, f::F, hat::Bool, centred::Bool, n::Int64) where F<:FunctionCompute a vector of the values of, for p = 1, …, n,
!hat & !centred: $v^N_{p,n}(f)$!hat & centred: $v^N_{p,n}(f-\eta_n^N(f))$hat & !centred: $\hat{v}_{p,n}^N(f)$hat & centred: $\hat{v}_{p,n}^N(f-\hat{\eta}_n^N(f))$
Note: if essThreshold <= 1.0, and resampling did not occur at every time, the length of the output will be less than n.
SequentialMonteCarlo.v — Methodv(smcio::SMCIO, f::F, hat::Bool, centred::Bool, n::Int64) where F<:FunctionCompute:
!hat & !centred: $v^N_n(f)$!hat & centred: $v^N_n(f-\eta_n^N(f))$hat & !centred: $\hat{v}_n^N(f)$hat & centred: $\hat{v}_n^N(f-\hat{\eta}_n^N(f))$