BlockCollection


DiffusionMCMCTools.BlockCollectionType
struct BlockCollection{TGP,TGPl,TW,TWn,TX}
    blocks::Vector{BiBlock{_L,TGP,TGPl,TW,TWn,TX} where _L}
end

Gathers all blocks relevant for an entire single recording.

BlockCollection(
    sp::SamplingPair{TGP,TGPl,TW,TWn,TX},
    ranges,
    ρρ=0.0,
    ll_hist_len=0
) where {TGP,TGPl,TW,TWn,TX}

Base constructor.

source

Imputation

DiffusionMCMCTools.draw_proposal_path!Method
draw_proposal_path!(bc::BlockCollection)

Sample proposal paths on each block, compute log-likelihoods along the way. Assumes bc.blocks[i].b.XX[1].x[1] are starting points for each block. Uses the preconditioned Crank-Nicolson scheme.

source

Accept/reject decision

Swaps

Setting up a block

GuidedProposals.set_obs!Method
GP.set_obs!(bc::BlockCollection)

Freeze an artificial observation at the terminal point of each block. For a terminal block nothing is done.

source

utility

DiffusionMCMCTools.loglikhd!Method
loglikhd!(bc::BlockCollection)

For each BiBlock in a collection compute the log-likelihood for the accepted block, evaluated at a sampled path and store the result in internal fields ll.

source
DiffusionMCMCTools.loglikhd°!Method
loglikhd°!(bc::BlockCollection)

For each BiBlock in a collection compute the log-likelihood for the proposal block, evaluated at a sampled path and store the result in internal fields ll.

source
DiffusionMCMCTools.fetch_llMethod
fetch_ll(bc::BlockCollection)

Retreive the log-likelihood for the entire accepted path.

Warning

The function uses only internal fields ll for this computation, which means that for the call to this function to make sense the log-likelihood must have been previously computed and stored in the field ll. If it hasn't been done, then you must first call loglikhd!(bc).

source
DiffusionMCMCTools.fetch_ll°Method
fetch_ll°(bc::BlockCollection)

Retreive the log-likelihood for the entire proposed path.

Warning

The function uses only internal fields ll for this computation, which means that for the call to this function to make sense the log-likelihood must have been previously computed and stored in the field ll. If it hasn't been done, then you must first call loglikhd°!(bc).

source
DiffusionMCMCTools.save_ll!Method
save_ll!(bc::BlockCollection, i::Int)

For each block in the collection commit the current proposal and accepted log-likelihood fields ll to history, at index i.

source
DiffusionMCMCTools.ll_of_acceptedMethod
ll_of_accepted(bb::BlockCollection, i)

Return an array of log-likelihoods (one for each block) of the paths that were accepted at the ith iteration.

source
DiffusionMCMCTools.accpt_rateMethod
accpt_rate(bb::BlockCollection, range)

Compute the acceptance rate over the range of MCMC accept/reject history for each block in the collection.

source

Setting parameters

DiffusionMCMCTools.set_proposal_law!Function
set_proposal_law!(
    bc::BlockCollection,
    θ°,
    pnames,
    critical_change=GP.is_critical_update(bc, pnames);
    skip=0
)

For each block in the collection set the parameters in bb.b°.PP and bb.b°.P_last to θ° and make sure that all other parameters are shared with bb.b.PP and bb.b.P_last. Recompute the guiding term if needed, and then, compute the proposal trajectory bb.b°.XX for the proposal point θ°.

source