blackjax.adaptation.laps#
Classes#
Functions#
|
should be transfered to benchmarks/ |
|
|
|
model: the target density object |
Module Contents#
- 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]#
-
- 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:
- 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