API

TuringABC.ABCType
ABC <: AbstractMCMC.AbstractSampler

Approximate Bayesian Computation (ABC) sampler.

Fields

  • dist_and_stat: distance and statistic method expecting two arguments: data_true and data_proposed

  • adapt_threshold: whether or not to use a schedule for decreasing the threshold

  • threshold_initial: initial threshold used for comparison to decide whether to accept or reject

  • threshold_minimum: final threshold used for comparison to decide whether to accept or reject

  • threshold_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.

source
TuringABC.DiracDeltaType
DiracDelta(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.

source
TuringABC.make_joint_modelMethod
make_joint_model(sampler::ABC, model::DynamicPPL.Model)

Return a model with observations now also considered random variables.

source
TuringABC.sample_from_jointMethod
sample_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.

source
TuringABC.split_latent_dataMethod
split_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.

source
TuringABC.statistic_distanceMethod
statistic_distance(sampler::ABC, data_true, data_candidate)

Return the distance between the statistics of data_true and data_candidate.

source
TuringABC.statistic_distanceMethod
statistic_distance(sampler::ABC, model::DynamicPPL.Model, data_candidate)

Return the distance between observations in model and data_candidate.

source