struct gpr::laplace::SliceSamplerOptions

Overview

Options for the doubling slice sampler. More…

#include <SliceSampler.h>
 
struct SliceSamplerOptions {
    // fields
 
    int n_samples = 16;
    int n_burnin = 4;
    double initial_width = 0.5;
    int max_doublings = 10;
    int max_shrinks = 32;
    uint64_t seed = 42;
};

Detailed Documentation

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 gpr_optim).

Fields

int 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.

int n_burnin = 4

Number of leading samples to discard for chain warm-up.

double 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.

int 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.

int 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).

uint64_t seed = 42

RNG seed for reproducibility. The same seed across MPI ranks gives an identical chain (sampling runs only on rank 0).