API

This page is a dump of all the docstrings found in the code.

OptimalPolicies.UMetropolis — Type
UMetropolis

MCMC explorer, should not contain state that is replica-specific and/or changed in the inner sampling loop (use an Augmentation if the explorer needs replica-specific auxiliary state information)

source
OptimalPolicies.UState — Type
UState

UState holds the state of the system, which is going to be application-specific. Here, it's just a number, but this might be itself a large object, e.g. a Matrix, or a lists of lists, etc.

source
OptimalPolicies.U — Method
U(gam::Number, x::Number)

The potential function for some given potential barrier height gam

source
OptimalPolicies.chain — Method
chain(target; tune = 0.1, init = 1.0, iters = Int(1e3))

The Metropolis algorithm targeting a particular potential function target

source
OptimalPolicies.chains — Method
chains(; pot = U, tune = 0.1, init = 1.0, iters = Int(1e3), temps = [1, 2])

Generates chains based on the temps

source
OptimalPolicies.plot_chain — Method
plot_chain(xvec, gam; dir = "result/")

Plot the value, autocorrelation, and density of a chain xvec given the value of gam, store the plot in the directory dir

source
Pigeons.step! — Method
Pigeons.step!(explorer::UMetropolis, replica, shared)

Customized MCMC exploration function that performs MCMC update within each chain

glossary:

explorer: object that does this updating

replica: roughly corresponds to a chain, which holds the state of the system, random number generator state, and some global parameters

shared: even higher level object that knows about other replicas

source