blackjax.adaptation.laps#

Classes#

Functions#

bias(model)

should be transfered to benchmarks/

while_steps_num(cond)

laps(logdensity_fn, sample_init, ndims, num_steps1, ...)

model: the target density object

Module Contents#

class AdaptationState[source]#
steps_per_sample: float[source]#
step_size: float[source]#
stepsize_adaptation_state: Any[source]#
iteration: int[source]#
class Adaptation(adaptation_state, num_adaptation_samples, steps_per_sample=15, acc_prob_target=0.8, observables=lambda x: ..., observables_for_bias=lambda x: ..., contract=lambda x: ...)[source]#
num_adaptation_samples[source]#
observables[source]#
observables_for_bias[source]#
contract[source]#

amount of tuning in the adjusted phase before fixing params steps_per_sample: number of steps per sample acc_prob_target: target acceptance probability observables: function to compute observables, for diagnostics observables_for_bias: function to compute observables for bias, for diagnostics contract: function to contract observables, for diagnostics

Type:

num_adaptation_samples

epsadap_update[source]#
initial_state[source]#
summary_statistics_fn(state, info, rng_key)[source]#
update(adaptation_state, Etheta)[source]#
bias(model)[source]#

should be transfered to benchmarks/

while_steps_num(cond)[source]#
laps(logdensity_fn, sample_init, ndims, num_steps1, num_steps2, num_chains, mesh, rng_key, microcanonical=True, alpha=1.9, save_frac=0.2, C=0.1, early_stop=True, r_end=0.01, bias_type=3, diagonal_preconditioning=True, integrator_coefficients=None, steps_per_sample=15, acc_prob=None, observables_for_bias=lambda x: ..., all_chains_info=None, diagnostics=True, contract=lambda x: ..., superchain_size=1)[source]#

model: the target density object num_steps1: number of steps in the first phase num_steps2: number of steps in the second phase num_chains: number of chains mesh: the mesh object, used for distributing the computation across cpus and nodes rng_key: the random key alpha: L = sqrt{d} * alpha * variances save_frac: the fraction of samples used to estimate the fluctuation in the first phase C: constant in stage 1 that determines step size (eq (9) of EMAUS paper) early_stop: whether to stop the first phase early r_end diagonal_preconditioning: whether to use diagonal preconditioning integrator_coefficients: the coefficients of the integrator steps_per_sample: the number of steps per sample acc_prob: the acceptance probability observables: the observables (for diagnostic use) all_chains_info: summary statistics calculated and stored for all chain at each iteration so it can be memory intensive diagnostics: whether to return diagnostics