struct gpr::laplace::PsisLaplaceOptions

Overview

Options for the PSIS-Laplace sampler. More…

#include <PsisLaplace.h>
 
struct PsisLaplaceOptions {
    // fields
 
    int n_samples = 16;
    double k_hat_threshold = 0.7;
    double hessian_jitter_max = 1.0e-3;
    uint64_t seed = 42;
    bool deterministic_axial_grid = false;
};

Detailed Documentation

Options for the PSIS-Laplace sampler. Defaults match the slice sampler’s M = 16 so the per-fit cache is the same shape, but the per-sample cost is roughly 5x smaller because PSIS does no doubling step-out / shrink-propose loop.

Fields

int n_samples = 16

Number K of importance samples drawn from the Laplace proposal. Default 16 matches SliceSamplerOptions::n_samples for a fair per-fit-cache comparison. Vehtari 2024 recommends K >= 32 for stable PSIS smoothing but at K = 16 the self-normalised IS estimator still has bounded variance (the smoothing matters mainly above K = 100). Reducing K to 8 was empirically a no-op on PET-MAD np=16 wall: the per-call variance loop is not the dominant cost; the per-fit assembleExactHessian (10 directional curvatures via Williams-Rasmussen 5.9 polarisation) is.

double k_hat_threshold = 0.7

Vehtari 2024 reliability threshold on the fitted Pareto shape k_hat: > 0.7 marks the proposal as missing the posterior tail and the caller should fall back. The default matches the JMLR paper’s “unreliable” cutoff exactly.

double hessian_jitter_max = 1.0e-3

Cap on the Cholesky jitter floor we will add to the Hessian before factorising. The Hessian at the SCG MAP can be barely positive-definite when the dimer’s BFGS landed on a flat passenger direction; bump up to this much before declaring the proposal singular.

uint64_t seed = 42

RNG seed for sample generation. Used only when deterministic_axial_grid == false.

bool deterministic_axial_grid = false

Use a deterministic axial grid (CCD-style) instead of random IS draws. With this true, the K samples are placed at (theta_MAP, theta_MAP +/- sigma_j e_j for j = 1..p) on the principal axes of H^{-1}, where e_j is the j-th eigenvector. K = 1 + 2 p deterministic nodes np-reproducible because no per-rank seed offset, no Monte Carlo variance. Trades sampling freedom for reproducibility. Recommended for production LAPLACE_SLICE; the random IS draws (false) are kept for research / unit-test coverage of the PSIS smoothing path.