struct gpr::laplace::SteinVariationalConfig

Overview

Configuration knobs for SVGD::fit, mirroring the AtomicDimer::VarianceGateConfig pattern: a small named-field struct with all defaults visible in one place. More…

#include <SteinVariational.h>
 
struct SteinVariationalConfig {
    // fields
 
    int n_iterations = 10;
    double step_size = 0.05;
    double conv_tol = 1e-3;
    double init_f0 = 0.0;
};

Detailed Documentation

Configuration knobs for SVGD::fit, mirroring the AtomicDimer::VarianceGateConfig pattern: a small named-field struct with all defaults visible in one place. Avoids hardcoded magic literals at the call site (T=30, eps=0.05) and lets bench / test code dial them without recompiling.

Fields

int n_iterations = 10

T max SVGD iterations per fit. With conv_tol = 1e-3, Liu-Wang 2016 Section 5 reports convergence in 5-15 iterations on posterior targets initialised at the CCD grid (which is the case for fitSVGDFromScratch particles start at the LaplaceINLA Hessian eigenvectors, already inside the posterior mode’s basin). T = 10 is the early-converge cap; the conv_tol-driven break short-circuits even sooner on well-conditioned fixtures. Override to T = 30 for unconverged or multimodal targets where the full T iterations are needed.

double step_size = 0.05

eps gradient step (Liu-Wang 0.1 with AdaGrad; we use 0.05 fixed)

double conv_tol = 1e-3

early-stop on max particle move

double init_f0 = 0.0

CCD init radius; 0 = sqrt(p + 2)