DiffusionMCMCTools
DiffusionMCMCTools.BiBlockDiffusionMCMCTools.BlockDiffusionMCMCTools.BlockCollectionDiffusionMCMCTools.BlockEnsembleDiffusionMCMCTools.ParamNamesAllObsDiffusionMCMCTools.ParamNamesBlockDiffusionMCMCTools.ParamNamesRecordingDiffusionMCMCTools.ParamNamesUnitDiffusionMCMCTools.SamplingEnsembleDiffusionMCMCTools.SamplingPairDiffusionMCMCTools.SamplingUnitDiffusionDefinition.set_parameters!DiffusionMCMCTools._eql_PP!DiffusionMCMCTools.accept_reject_proposal_path!DiffusionMCMCTools.accept_reject_proposal_path!DiffusionMCMCTools.accept_reject_proposal_path!DiffusionMCMCTools.accpt_rateDiffusionMCMCTools.accpt_rateDiffusionMCMCTools.accpt_rateDiffusionMCMCTools.draw_proposal_path!DiffusionMCMCTools.draw_proposal_path!DiffusionMCMCTools.draw_proposal_path!DiffusionMCMCTools.draw_proposal_path!DiffusionMCMCTools.fetch_llDiffusionMCMCTools.fetch_llDiffusionMCMCTools.fetch_ll°DiffusionMCMCTools.fetch_ll°DiffusionMCMCTools.find_W_for_X!DiffusionMCMCTools.find_W_for_X!DiffusionMCMCTools.find_W_for_X!DiffusionMCMCTools.find_W_for_X!DiffusionMCMCTools.find_var_aux_names_not_in_MCMC_updateDiffusionMCMCTools.find_var_names_not_in_MCMC_updateDiffusionMCMCTools.find_θ_aux_names_for_MCMC_updateDiffusionMCMCTools.find_θ_names_for_MCMC_updateDiffusionMCMCTools.find_θ_obs_idx_for_MCMC_updateDiffusionMCMCTools.init_paths!DiffusionMCMCTools.ll_of_acceptedDiffusionMCMCTools.ll_of_acceptedDiffusionMCMCTools.ll_of_acceptedDiffusionMCMCTools.loglikhd!DiffusionMCMCTools.loglikhd!DiffusionMCMCTools.loglikhd!DiffusionMCMCTools.loglikhd!DiffusionMCMCTools.loglikhd°!DiffusionMCMCTools.loglikhd°!DiffusionMCMCTools.loglikhd°!DiffusionMCMCTools.recompute_path!DiffusionMCMCTools.save_ll!DiffusionMCMCTools.save_ll!DiffusionMCMCTools.save_ll!DiffusionMCMCTools.save_ll!DiffusionMCMCTools.set_accepted!DiffusionMCMCTools.set_ll!DiffusionMCMCTools.set_proposal_law!DiffusionMCMCTools.set_proposal_law!DiffusionMCMCTools.set_proposal_law!DiffusionMCMCTools.swap_PP!DiffusionMCMCTools.swap_PP!DiffusionMCMCTools.swap_PP!DiffusionMCMCTools.swap_WW!DiffusionMCMCTools.swap_WW!DiffusionMCMCTools.swap_WW!DiffusionMCMCTools.swap_XX!DiffusionMCMCTools.swap_XX!DiffusionMCMCTools.swap_XX!DiffusionMCMCTools.swap_ll!DiffusionMCMCTools.swap_ll!DiffusionMCMCTools.swap_ll!DiffusionMCMCTools.swap_paths!DiffusionMCMCTools.swap_paths!DiffusionMCMCTools.swap_paths!GuidedProposals.equalize_law_params!GuidedProposals.equalize_obs_params!GuidedProposals.is_critical_updateGuidedProposals.is_critical_updateGuidedProposals.is_critical_updateGuidedProposals.loglikhdGuidedProposals.loglikhdGuidedProposals.recompute_guiding_term!GuidedProposals.recompute_guiding_term!GuidedProposals.recompute_guiding_term!GuidedProposals.recompute_guiding_term!GuidedProposals.recompute_guiding_term!GuidedProposals.set_obs!GuidedProposals.set_obs!GuidedProposals.set_obs!
DiffusionDefinition.set_parameters! — FunctionDD.set_parameters!(
bb::BiBlock,
θ°,
pnames,
critical_change=is_critical_update(bb, pnames)
)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.
DiffusionMCMCTools._eql_PP! — Method_eql_PP!(PP, PP°, var_p_names, var_p_aux_names)Go through all GuidProp structs in PP and PP° and make sure that the parameters listed in var_p_names and var_p_aux_names agree. Equalize them if they do not. var_p_names should list all parameter names from the target law and var_p_aux_names should list all parameters from the auxiliary law.
DiffusionMCMCTools.accept_reject_proposal_path! — Methodaccept_reject_proposal_path!(be::BlockEnsemble, mcmciter)Call accept_reject_proposal_path! separately for each recording.
DiffusionMCMCTools.accpt_rate — Methodaccpt_rate(be::BlockEnsemble, range)Compute the acceptance rate over the range of MCMC accept/reject history for each block for each recording.
DiffusionMCMCTools.draw_proposal_path! — Methoddraw_proposal_path!(be::BlockEnsemble)Call draw_proposal_path! separately for each recording
DiffusionMCMCTools.fetch_ll — Methodfetch_ll(be::BlockEnsemble)Retreive the log-likelihood for all accepted paths
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!(be).
DiffusionMCMCTools.fetch_ll° — Methodfetch_ll°(be::BlockEnsemble)Retreive the log-likelihood for all proposed paths
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°!(be).
DiffusionMCMCTools.find_W_for_X! — Methodfind_W_for_X!(bc::BlockCollection)For each block find the Wiener process bb.b.WW that reconstructs the path bb.b.XX under the accepted law bb.b.PP (possibly including bb.b.P_last).
DiffusionMCMCTools.find_W_for_X! — Methodfind_W_for_X!(be::BlockEnsemble)Call find_W_for_X! separately for each recording.
DiffusionMCMCTools.find_var_aux_names_not_in_MCMC_update — Methodfind_var_aux_names_not_in_MCMC_update(composite_names_in_updt, PP)Parse through all PP and for each element look through variable names of P_aux and remove all those names that already feature in composite_names_in_updt.
DiffusionMCMCTools.find_var_names_not_in_MCMC_update — Methodfind_var_names_not_in_MCMC_update(composite_names_in_updt, PP)Parse through all variable names of P_target and remove all those names that already feature in composite_names_in_updt.
DiffusionMCMCTools.find_θ_aux_names_for_MCMC_update — Methodfind_θ_aux_names_for_MCMC_update(θ_names_for_MCMC_update, PP)Parse through PP and for each GuidProp struct enter the auxiliary law P_aux and pick out names from θ_names_for_MCMC_update that are relevant to this P_aux law.
DiffusionMCMCTools.find_θ_names_for_MCMC_update — Methodfind_θ_names_for_MCMC_update(θnames, pdep)Parse through θnames i.e. a list of all parameter names that are relevant for a given MCMC update and pick out only those that are relevant for a given diffusion law. All information about the relevant parameters of the law should be stored inside pdep. Return a list of relevant parameter names in a format: idx-of-θ-to-relevant-value => name-of-param-inside-P_target-struct.
DiffusionMCMCTools.find_θ_obs_idx_for_MCMC_update — Methodfind_θ_obs_idx_for_MCMC_update(θnames, odeps)Parse through θnames i.e. a list of all parameter names that are relevant for a given MCMC update and for each observation pick out only those that are relevant for it. All information about the relevant parameters of the observations should be stored inside odeps. Return a list of relevant parameter names in a format: idx-of-θ-to-relevant-value => idx-of-obs-inside-obs.θ.
DiffusionMCMCTools.init_paths! — Methodinit_paths!(P, WW, Wnr, XX, x0_prior)Sample paths of guided proposals without using the preconditioned Crank–Nicolson scheme.
DiffusionMCMCTools.ll_of_accepted — Methodll_of_accepted(be::BlockEnsemble, i)Return an array of log-likelihoods (one for each block in each recording) of the paths that were accepted at the ith iteration.
DiffusionMCMCTools.loglikhd! — Methodloglikhd!(be::BlockEnsemble)Call loglikhd! separately for each recording.
DiffusionMCMCTools.loglikhd°! — Methodloglikhd°!(be::BlockEnsemble)Call loglikhd°! separately for each recording.
DiffusionMCMCTools.save_ll! — Methodsave_ll!(be::BlockEnsemble, i::Int)Call save_ll! separately for each recording.
DiffusionMCMCTools.set_proposal_law! — Functionset_proposal_law!(
be::BlockEnsemble,
θ°,
pnames,
critical_change=GP.is_critical_update(bc, pnames);
skip=0
)Call set_proposal_law! separately for each recording.
DiffusionMCMCTools.set_proposal_law! — Functionset_proposal_law!(
bb::BiBlock,
θ°,
pnames,
critical_change=GP.is_critical_update(bb, pnames);
skip=0
)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 θ°.
DiffusionMCMCTools.swap_PP! — Methodswap_PP!(be::BlockEnsemble)Call swap_PP! separately for each recording.
DiffusionMCMCTools.swap_WW! — Methodswap_WW!(be::BlockEnsemble)Call swap_WW! separately for each recording.
DiffusionMCMCTools.swap_XX! — Methodswap_XX!(be::BlockEnsemble)Call swap_XX! separately for each recording.
DiffusionMCMCTools.swap_ll! — Methodswap_ll!(be::BlockEnsemble)Call swap_ll! separately for each recording.
DiffusionMCMCTools.swap_paths! — Methodswap_paths!(be::BlockEnsemble)Call swap_paths! separately for each recording.
GuidedProposals.equalize_law_params! — MethodGP.equalize_law_params!(bb::BiBlock, pnames)Make sure that in the corresponding pairs of GuidProp structs of both bb.b and bb.b°, the variable parameters of each law are the same. If not, then set the ones in bb.b° to be the same as the ones in bb.b.
GuidedProposals.equalize_obs_params! — MethodGP.equalize_obs_params!(bb::BiBlock)Make sure that in the corresponding pairs of GuidProp structs of both bb.b and bb.b°, the parameters θ of the obs fields are the same. If not, then set the ones in bb.b° to be the same as the ones in bb.b.
GuidedProposals.is_critical_update — Methodis_critical_update(bb::BiBlock, pnames)Verify whether the update characterized by a list of parameter names stored in pnames is critical in a sense of prompting for recomputation of the guiding term.
GuidedProposals.is_critical_update — Methodis_critical_update(bb::BlockCollection, pnames)For each block in the collection verify whether the update characterized by a list of parameter names stored in pnames is critical in a sense of prompting for recomputation of the guiding term.
GuidedProposals.is_critical_update — Methodis_critical_update(be::BlockEnsemble, pnames)Call is_critical_update separately for each recording.
GuidedProposals.recompute_guiding_term! — MethodGP.recompute_guiding_term!(bc::BlockCollection, [::Val{:_only}])For each block in the collection recompute the guiding terms of both the proposal and the accepted laws. If an additional flag Val(:P_only) is passed, then recomputes the guiding term on accepted law only. If Val(:P°_only), then recomputes for the proposal law only.
GuidedProposals.recompute_guiding_term! — MethodGP.recompute_guiding_term!(be::BlockEnsemble, [::Val{:_only}])Call recompute_guiding_term! separately for each recording.
GuidedProposals.set_obs! — MethodGP.set_obs!(be::BlockEnsemble)Call save_ll! separately for each recording.