Workspaces
Workspaces are containers on which most of the computations done by the MCMC algorithm are performed. It is not important to know how this work is dealt with internally; however, it is helpful to know what are the entries of the global and local workspace for diffusions, as the output of the call to run!
is precisely that:
- the
DiffusionGlobalWorkspace
, as well as DiffusionLocalWorkspace
for each update.
Global workspaces
Global workspace holds information about the history of the parameters (both accepted and proposed) as well as some standard, already pre-computed statistics about the chain.
DiffusionMCMC.DiffusionGlobalSubworkspace
— Typestruct DiffusionGlobalSubworkspace{T,TGP,TW,TWn,TX} <: eMCMC.GlobalWorkspace{T}
P::TGP
WW::TW
Wnr::TWn
XX::TX
end
Convenience sub-workspace that holds
P::Vector{<:Vector{<:GuidProp}}
: theGuidProp
laws [TODO change to PP or PPP]WW::Vector{<:Vector{<:Trajectory}}
: the containers for sampling the Wiener noiseWnr::Vector{<:Wiener}
: the flags for the Wiener noiseXX::Vector{<:Vector{<:Trajectory}}
: the containers for sampling the diffusion paths
The outer array corresponds to successive recording
s, the inner arrays correspond to successive observations within each recording. Each DiffusionSubworkspace
has two DiffusionGlobalSubworkspace
s, one for the accepted law/path another for the proposal.
DiffusionGlobalSubworkspace{T}(
aux_laws, data::AllObservations, tts, args,
) where T
A standard constructor. aux_laws
is a list of auxiliary laws (one for each recording), data
holds the observations, tts
are the time-grids on which to do imputation when sampling and args
are additional positional arguments passed to initializers of GuidProp
.
DiffusionMCMC.DiffusionGlobalWorkspace
— Typestruct DiffusionGlobalWorkspace{T,SW,SWD,TD,TX} <: eMCMC.GlobalWorkspace{T}
sub_ws::SW
sub_ws_diff::SWD
sub_ws_diff°::SWD
data::TD
stats::GenericChainStats{T}
XX_buffer::TX
pnames::Vector{Symbol}
end
Global workspace for MCMC problems concerning diffusions.
Arguments
sub_ws
:GenericGlobalSubworkspace
fromExtensibleMCMC
that stores info about the parameter chainsub_ws_diff
:DiffusionGlobalSubworkspace
containers for the accepted diffusion law/pathssub_ws_diff°
:DiffusionGlobalSubworkspace
containers for the proposed diffusion law/pathsdata
: observationsstats::GenericChainStats
: generic online statistics for the param chainXX_buffer
: cache for saving a chain of pathspnames
: a list of parameter names that are being updated
Local workspaces
Local workspaces hold information pertinent to particular updates. In particular it collects such information as acceptance history or a history of log-likelihoods.
DiffusionMCMC.DiffusionLocalSubworkspace
— Typestruct DiffusionLocalSubworkspace{T,TP,TW,TWn,TX,Tz0} <: eMCMC.LocalWorkspace{T}
ll::Vector{Float64}
ll_history::Vector{Vector{Float64}}
P::TP
WW::TW
Wnr::TWn
XX::TX
z0s::Tz0
end
Convenience sub-workspace that holds
ll::Vector{Float64}
: computational buffer for log-likelihoods (one for each recording)ll_history::Vector{Vector{Float64}}
: history of all log-likelihoodsP
: appropriately shaped views to containers withGuidProp
sWW
: appropriately shaped views to containers for sampled Wiener processWnr
: list of Wiener flags for each recordingXX
: appropriately shaped views to containers for sampled diffusion pathsz0s
: list of white noise for starting points (one for each recording)
DiffusionMCMC.DiffusionLocalWorkspace
— Typestruct DiffusionLocalWorkspace{T,SW,SWD,Tpr,AH} <: eMCMC.LocalWorkspace{T}
sub_ws::SW
sub_ws°::SW
sub_ws_diff::SWD
sub_ws_diff°::SWD
xx0_priors::Tpr
acceptance_history::Vector{AH}
loc_pnames::LocalUpdtParamNames
critical_param_change::Vector{Bool}
end
Local workspace for MCMC problems concerning diffusions.
Arguments
sub_ws
:GenericLocalSubworkspace
fromExtensibleMCMC
that acts as a local cache for some light parameter computationssub_ws°
: same assub_ws
, but concerns the proposed parametersub_ws_diff
:DiffusionLocalSubworkspace
, views to containers for the accepted diffusion law/pathssub_ws_diff°
:DiffusionLocalSubworkspace
, views to containers for the proposed diffusion law/pathsxx0_priors
: priors over starting pointsacceptance_history
: history of results from the accept/reject Metropolis–Hastings steploc_pnames
: various lists of parameter names helping in performing the update in a clean waycritical_param_change
: a list of flags for whether a given update by itself prompts for recomputation of the guiding term