Model Selection Reference
GpABC
functions for Model Selection.
Index
Types and Functions
GpABC.SimulatedModelSelection
— FunctionSimulatedModelSelection
Perform model selection using simulation-based ABC.
Arguments
reference_data::AbstractArray{Float64,2}
: The observed data to which the simulated model output will be compared. Size: (nmodeltrajectories, ntimepoints)threshold_schedule::AbstractArray{Float64}
: A set of maximum distances from the summarised model output to summarised observed data for a parameter vector to be included in the posterior. Each distance will be used in a single run of the ABC-SMC algorithm.parameter_priors::AbstractArray{AbstractArray{ContinuousUnivariateDistribution},1}
: Priors for the parameters of each model. The length of the outer array is the number of models.summary_statistic::Union{String,AbstractArray{String,1},Function}
: Either: 1. AString
or 1D Array of strings that Or 2. A function that outputs a 1D Array of Floats that summarises model output. Defaults tokeep_all
. See detailed documentation of summary statistics.simulator_functions::AbstractArray{Function,1}
: An array of functions that take a parameter vector as an argument and outputs model results (one per model).- 'model_prior::DiscreteUnivariateDistribution': The prior from which models are sampled. Default is a discrete, uniform distribution.
distance_function::Union{Function,Metric}
: A function or metric that computes the distance between 2 1D Arrays. Optional argument (default is to use the Euclidean distance).max_iter::Int
: The maximum number of simulations that will be run. The default is 1000*n_particles
. Each iteration samples a single model and performs ABC using a single particle.
Returns
A ModelSelectionOutput
object that contains which models are supported by the observed data.
GpABC.EmulatedModelSelection
— FunctionEmulatedModelSelection
Perform model selection using emulation-based ABC.
Arguments
n_design_points::Int64
: The number of parameter vectors used to train the Gaussian process emulator.reference_data::AbstractArray{Float64,2}
: The observed data to which the simulated model output will be compared. Size: (nmodeltrajectories, ntimepoints)n_particles::Int64
: The number of parameter vectors (particles) that will be included in the final posterior.threshold_schedule::AbstractArray{Float64}
: A set of maximum distances from the summarised model output to summarised observed data for a parameter vector to be included in the posterior. Each distance will be used in a single run of the ABC-SMC algorithm.parameter_priors::AbstractArray{AbstractArray{ContinuousUnivariateDistribution},1}
: Priors for the parameters of each model. The length of the outer array is the number of models.summary_statistic::Union{String,AbstractArray{String,1},Function}
: Either: 1. AString
or 1D Array of strings that Or 2. A function that outputs a 1D Array of Floats that summarises model output. Defaults tokeep_all
. See detailed documentation of summary statistics.simulator_functions::AbstractArray{Function,1}
: An array of functions that take a parameter vector as an argument and outputs model results (one per model).- 'model_prior::DiscreteUnivariateDistribution': The prior from which models are sampled. Default is a discrete, uniform distribution.
distance_function::Union{Function,Metric}
: A function or metric that computes the distance between 2 1D Arrays. Optional argument (default is to use the Euclidean distance).max_iter::Int
: The maximum number of simulations that will be run. The default is 1000*n_particles
. Each iteration samples a single model and performs ABC using a single particle.max_batch_size::Int
: The maximum batch size for the emulator when making predictions.
Returns
A ModelSelectionOutput
object that contains which models are supported by the observed data.
GpABC.ModelSelectionOutput
— TypeModelSelectionOutput
Contains results of a model selection computation, including which models are best supported by the observed data and the parameter posteriors at each population for each model.
Fields
M::Int64
: The number of models.n_accepted::AbstractArray{AbstractArray{Int64,1},1}
: The number of parameters accepted by each model at each population.n_accepted[i][j]
contains the number of acceptances for modelj
at populationi
.threshold_schedule::AbstractArray{Float64,1}
: A set of maximum distances from the summarised model output to summarised observed data for a parameter vector to be included in the posterior.smc_outputs::AbstractArray{ABCSMCOutput,1}
: A ['SimulatedABCSMCOutput']@(ref) or ['EmulatedABCSMCOutput']@(ref) for each model. Use to find details of the ABC results at each population.completed_all_populations::Bool
: Indicates whether the algorithm completed all the populations successfully. A successful population is one where at least one model accepts at least one particle.