ParameterSpacePartitions.Options
— TypeOptions(;
radius = .1,
bounds,
n_iters,
init_parms,
parallel = false,
adapt_radius! = adapt!,
kwargs...
)
An object that holds configuration options for the MCMC sampler.
Fields
parallel=false
: runs model on threads if true. A speed up is observed if the evaluation
time of the function is 1 ms or greater.
radius = .10
: the initial radius length for each chainbounds
: a vector of tuples representing (lowerbound, upperbound) for each dimension in
the parameter space
x_range
: the range of allowable values for each parametern_iters
: number of iterations to performp_eval
: the function that evalues the model and pattern functionsadapt_radius!=adapt!
: a function in the form offunc(chain, options; kwargs...)
that adapts
the radius.
init_parms
: a vector of starting points, such as [[.3,.4],[.3,.5]] in the 2 dimensional case.n_dims
: number of dimensions in parameter spaceparm_names
: a vector of symbols corresponding to parameter names. The default is [:p1,:p2,..:pn]add_iters
: the number of trials to run after merging chains with the same pattern located in the same region
ParameterSpacePartitions.adapt!
— Methodadapt!(
chain,
options;
t_rate = .20,
kwargs...
)
Iteratively adapts the radius to achieve a target acceptance rate. The radius is adjusted according to the following factor c
:
c = exp(λ * d_rate)
where λ
is the adaption rate, and d_rate
is the difference between the acceptance rate and target acceptance rate.
Arguments
chain
: a chain for exploring the parameter spaceoptions
: a set of options for configuring the algorithm
Keyword Arguments
t_rate = .20
: target acceptance ratekwargs...
: keyword arguments that are not processed
ParameterSpacePartitions.estimate_volume
— Methodestimate_volume(
model,
p_fun,
points,
target,
bounds,
args...;
n_sim = 10_000,
kwargs...
)
Estimate volume of region with an eillipsoid and hit or miss bias adjustment.
Arguments
model
: a model function that returns predictions given a vector of parametersp_fun
: a function that that evaluates the qualitative data patternpoints
: a p x n matrix of sampled points where p is the number of parameters and n is the number of samplestarget
: the target pattern associated with thepoints
bounds
: a vector of tuples representing (lowerbound, upperbound) for each dimension inargs...
: arguments passed tomodel
andp_fun
Keywords
n_sim=10_000
: the number of samples for hit or miss bias adjustmentkwargs...
: additional keyword arguments passed tomodel
orp_fun
ParameterSpacePartitions.find_partitions
— Methodfind_partitions(model, p_fun, options, args...; show_timer=false, kwargs...)
Performs parameter space partitioning.
Arguments
model
: a model function that returns predictions given a vector of parametersp_fun
: a function that that evaluates the qualitative data patternoptions
: a set of options for configuring the algorithmargs...
: arguments passed tomodel
andp_fun
Keywords
show_timer=false
: displays timer and progress bar if truekwargs...
: keyword arguments passed tomodel
andp_fun