ABC Advanced Reference

Advanced aspects of GpABC support for parameter estimation with Approximate Bayesian Computation.

Index

Types and Functions

GpABC.AbstractEmulatorTrainingType
AbstractEmulatorTraining

Subtypes of this abstract type control how the emulator is trained for emulation-based ABC algorithms (rejection and SMC). At the moment, only DefaultEmulatorTraining is shipped. Custom emulator training procedure can be implemented by creating new subtypes of this type and overriding train_emulator for them.

A typical use case would be trying to control the behaviour of gp_train more tightly, or not using it altogether (e.g. using another optimisation package).

source
GpABC.MeanVarEmulatedParticleSelectionType
MeanVarEmulatedParticleSelection <: AbstractEmulatedParticleSelection

When this strategy is used, the particles for which both mean and standard deviation returned by gp_regression is below the ABC threshold are included in the posterior. In pseudocode:

means, vars = gp_regression(parameters, gpm)
accepted_indices = findall((means .<= threshold) .& (sqrt.(vars) .<= threshold))

The rationale behind using this selection strategy is to take into account the "level of uncertainty" about the regression prediction that is provided by the Gaussian Process in form of standard deviation. So, even if the mean of the GP is below the threshold, but the GP is "uncertain" about it (i.e. the variance is high), this particle will not be included in the posterior distribution of ABC. It is a more stringent acceptance criteria than MeanEmulatedParticleSelection.

Fields

  • variance_threshold_factor: scaling factor, by which the ABC threshold is multiplied

before checking the standard deviation. Defaults to 1.0.

source
GpABC.MeanEmulatedParticleSelectionType
MeanEmulatedParticleSelection <: AbstractEmulatedParticleSelection

When this strategy is used, the particles for which only the mean value returned by gp_regression is below the ABC threshold are included in the posterior. Variance is not checked.

source
GpABC.PosteriorSampledEmulatedParticleSelectionType
PosteriorSampledEmulatedParticleSelection <: AbstractEmulatedParticleSelection

When this strategy is used, the distance is sampled from the GP posterior of the gp_regression object. If the sampled distance is below the threshold the particle is accepted.

Fields

  • use_diagonal_covariance: if true, the GP posterior covariance will be approximated by its

diagonal elements only. Defaults to false.

source
GpABC.IncrementalRetrainingType
IncrementalRetraining <: AbstractEmulatorRetraining

This emulator retraining strategy samples extra particles from the previous population, and adds them to the set of design points that were used on the previous iteration. The new design points are filtered according to the threshold. The combined set of design points is used to train the new emulator.

Fields

  • design_points: number of design points to add on each iteration
  • max_simulations: maximum number of simulations to perform during re-training on each iteration
source
GpABC.PreviousPopulationRetrainingType
PreviousPopulationRetraining <: AbstractEmulatorRetraining

This emulator retraining strategy samples extra particles from the previous population, and uses them to re-train the emulator from scratch. No filtering of the new design points is performed. Design points from the previous iteration are discarded.

source
GpABC.PreviousPopulationThresholdRetrainingType
PreviousPopulationThresholdRetraining <: AbstractEmulatorRetraining

This emulator retraining strategy samples extra particles from the previous population, and uses them to re-train the emulator from scratch. Design points from the previous iteration are discarded. This strategy allows to control how many design points are sampled with distance to the reference data below the threshold.

Fields:

  • n_design_points: number of design points
  • n_below_threshold: number of design points below the threshold
  • max_iter: maximum number of simulations to perform on each re-training iteration
source
GpABC.NoopRetrainingType
NoopRetraining <: AbstractEmulatorRetraining

A sentinel retraining strategy that does not do anything. When used, the emulator is trained only once at the start of the process.

source
GpABC.train_emulatorFunction
train_emulator(training_x, training_y, emulator_training<:AbstractEmulatorTraining)

Train the emulator. For custom training procedure, a new subtype of AbstractEmulatorTraining should be created, and a method of this function should be created for it.

Returns

A trained emulator. Shipped implementations return a GPModel.

source
GpABC.abc_retrain_emulatorFunction
abc_retrain_emulator(
    gp_model,
    particle_sampling_function,
    epsilon,
    training_input::EmulatorTrainingInput,
    retraining_settings<:AbstractEmulatorRetraining
    )

Additional retraining procedure for the emulator that may or may not be executed before every iteration of emulation based ABC. Details of the procedure are determined by the subtype of AbstractEmulatorRetraining that is passed as an argument.

source
GpABC.abc_select_emulated_particlesFunction
abc_select_emulated_particles(emulator, particles, threshold, selection<:AbstractEmulatedParticleSelection)

Compute the approximate distances by running the regression-based emulator on the provided particles, and return the accepted particles. Acceptance strategy is determined by selection - subtype of AbstractEmulatedParticleSelection.

Arguments

  • gpm: the GPModel, that contains the training data (x and y), the kernel, the hyperparameters and the test data for running the regression.
  • parameters: array of parameters to test (the particles).
  • threshold: if the distance for a particle is below threshold then it is accepted as a posterior sample.
  • selection: the acceptance strategy (a subtype of AbstractEmulatedParticleSelection). This determines the method by which an emulated distance is accepted.

Return

A tuple of accepted distances, and indices of the accepted particles in the supplied particles array.

source