pub type FlowMclmcSettings = MclmcSettings<FlowSettings>;Expand description
MCLMC settings with a learned flow transformation.
⚠️ Experimental — use with caution: Highly experimental. Correctness of the returned posteriors has not been verified. May change at any time.
Aliased Type§
pub struct FlowMclmcSettings {Show 16 fields
pub step_size: f64,
pub momentum_decoherence_length: f64,
pub num_tune: u64,
pub num_draws: u64,
pub num_chains: usize,
pub seed: u64,
pub max_energy_error: f64,
pub store_unconstrained: bool,
pub store_gradient: bool,
pub store_transformed: bool,
pub store_divergences: bool,
pub adapt_options: FlowSettings,
pub subsample_frequency: f64,
pub dynamic_step_size: bool,
pub trajectory_kind: MclmcTrajectoryKind,
pub trajectory_switch_fraction: f64,
}Fields§
§step_size: f64Step size ε for the ESH leapfrog integrator.
momentum_decoherence_length: f64Momentum decoherence length L (controls partial momentum refresh rate).
Set to f64::INFINITY to disable momentum refresh entirely.
num_tune: u64Number of warmup draws.
num_draws: u64Number of sampling draws after warmup.
num_chains: usizeNumber of parallel chains.
seed: u64RNG seed.
max_energy_error: f64Maximum energy error before a step is flagged as a divergence.
store_unconstrained: boolStore each unconstrained parameter vector in the sampler stats.
store_gradient: boolStore the gradient in the sampler stats.
store_transformed: boolStore the transformed gradient and value in the sampler stats
store_divergences: boolStore detailed information about each divergence in the sampler stats
adapt_options: FlowSettingsGeometry adaptation options (step-size fields are ignored for Euclidean settings).
subsample_frequency: f64Number of leapfrog steps per draw as a fraction of L / ε.
The number of leapfrog steps between collector calls is:
round(subsample_frequency * L / ε).max(1)
1.0(default) — one sample per full trajectory (at the final step).0.0— every leapfrog step.- Values in between space samples as a fraction of the decoherence
length, so the interval scales naturally when
Lorεchanges.
dynamic_step_size: boolWhen true, use the tree-structured step size retry on divergence:
halve the step size factor and try 2 steps before doubling back.
log_weight will include log(step_size) to correct for the varying
sampling density. When false, divergences are recorded immediately
without any retry and log_weight = -energy_change.
trajectory_kind: MclmcTrajectoryKindSelects which leapfrog integrator and partial-momentum-refresh style
to use. See MclmcTrajectoryKind for the available options.
Default: MclmcTrajectoryKind::Microcanonical (original MCLMC).
trajectory_switch_fraction: f64Fraction of num_tune draws at which the trajectory is switched from
Euclidean to Microcanonical when
trajectory_kind == MclmcTrajectoryKind::EuclideanEarlyThenMicrocanonical.
Ignored for other trajectory kinds. Default: 0.3.