#include <gpr/ml/laplace/SliceSampler.h>
Public Attributes | |
| int | n_samples = 16 |
| int | n_burnin = 4 |
| Number of leading samples to discard for chain warm-up. | |
| double | initial_width = 0.5 |
| int | max_doublings = 10 |
| int | max_shrinks = 32 |
| uint64_t | seed = 42 |
Options for the doubling slice sampler. Defaults are tuned for p=4 hyperparameters with a unimodal log-concave NLML target (the Gaussian likelihood + non-degenerate kernel + bounded-prior regime in gpridge).
Definition at line 41 of file SliceSampler.h.
| double gpr::laplace::SliceSamplerOptions::initial_width = 0.5 |
Initial step-out width in theta-space (units: nat-log of hyperparameter). Doubled at each step-out iteration. The default 0.5 corresponds to roughly +/- 1.5x in raw kernel parameters, which is wide enough to escape the local Laplace well without overshooting into pathological regions.
Definition at line 57 of file SliceSampler.h.
| int gpr::laplace::SliceSamplerOptions::max_doublings = 10 |
Cap on doubling iterations (Neal 2003 calls this p). After max_doublings doublings the interval is treated as "wide enough" even if the slice is not fully bracketed.
Definition at line 61 of file SliceSampler.h.
| int gpr::laplace::SliceSamplerOptions::max_shrinks = 32 |
Cap on shrink-and-propose attempts per slice step. After max_shrinks rejections the step is aborted and the chain stays at theta_curr (functionally equivalent to a stuck step).
Definition at line 65 of file SliceSampler.h.
| int gpr::laplace::SliceSamplerOptions::n_burnin = 4 |
Number of leading samples to discard for chain warm-up.
Definition at line 51 of file SliceSampler.h.
| int gpr::laplace::SliceSamplerOptions::n_samples = 16 |
Total number of posterior samples to retain after burn-in. At p = 4 the marginal posterior is sharply peaked once SCG converges, so M = 16 captures the spread well; the per-fit-burst cost is M * ~5 Cholesky each, which on PET-MAD (n_obs * (D + 1) ~ 500) is the dominant per-outer-iter cost. Keep small unless the bench shows the cached slice spread is undersampled.
Definition at line 49 of file SliceSampler.h.
| uint64_t gpr::laplace::SliceSamplerOptions::seed = 42 |
RNG seed for reproducibility. The same seed across MPI ranks gives an identical chain (sampling runs only on rank 0).
Definition at line 68 of file SliceSampler.h.