API
TuringABC.ABCTuringABC.DiracDeltaTuringABC.flattenTuringABC.make_joint_modelTuringABC.observationsTuringABC.sample_from_jointTuringABC.split_latent_dataTuringABC.statistic_distanceTuringABC.statistic_distanceTuringABC.varname_keys
TuringABC.ABC — TypeABC <: AbstractMCMC.AbstractSamplerApproximate Bayesian Computation (ABC) sampler.
Fields
dist_and_stat: distance and statistic method expecting two arguments:data_trueanddata_proposedadapt_threshold: whether or not to use a schedule for decreasing the thresholdthreshold_initial: initial threshold used for comparison to decide whether to accept or rejectthreshold_minimum: final threshold used for comparison to decide whether to accept or rejectthreshold_decay: factor by which to decrease the threshold
Notes
The current implementation uses a schedule for decreasing the threshold that is
\[\epsilon_{i+1} = \epsilon_i \cdot \frac{i}{i+1}^\text{threshold_decay}\]
where i is the current iteration and \theta is the current threshold.
Whether or not this is a good idea, I don't know! But it's trying to achieve a behavior where the threshold decreases rapidly at the first, and then more slowly for later iterations.
TuringABC.DiracDelta — TypeDiracDelta(value)A Dirac delta distribution with a single point mass at value.
This is basically the same as Distributions.Dirac but without being restricted to univariate values.
TuringABC.flatten — Methodflatten(x)Return a flattened version of x.
TuringABC.make_joint_model — Methodmake_joint_model(sampler::ABC, model::DynamicPPL.Model)Return a model with observations now also considered random variables.
TuringABC.observations — Methodobservations(sampler::ABC, model::DynamicPPL.Model)Return the observations in model.
TuringABC.sample_from_joint — Methodsample_from_joint(rng::Random.AbstractRNG, sampler::ABC, model::DynamicPPL.Model)Sample from the joint model.
Defaults to rand(rng, OrderedDict, make_joint_model(sampler, model)).
See also: make_joint_model.
TuringABC.split_latent_data — Methodsplit_latent_data(d::OrderedDict, data_variables, data)Return a 3-tuple with first element being variables, second being sampled data, and third being the original data.
The original data returned should be in the same format as the data sampled.
TuringABC.statistic_distance — Methodstatistic_distance(sampler::ABC, data_true, data_candidate)Return the distance between the statistics of data_true and data_candidate.
TuringABC.statistic_distance — Methodstatistic_distance(sampler::ABC, model::DynamicPPL.Model, data_candidate)Return the distance between observations in model and data_candidate.
TuringABC.varname_keys — Methodvarname_keys(x)Like keys(x), but returns a collection of VarName instead of Symbol.