.. index:: pair: struct; gpr::laplace::SteinVariationalConfig .. _doxid-structgpr_1_1laplace_1_1_stein_variational_config: struct gpr::laplace::SteinVariationalConfig =========================================== .. toctree:: :hidden: Overview ~~~~~~~~ Configuration knobs for SVGD::fit, mirroring the AtomicDimer::VarianceGateConfig pattern: a small named-field struct with all defaults visible in one place. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include struct SteinVariationalConfig { // fields int :ref:`n_iterations` = 10; double :ref:`step_size` = 0.05; double :ref:`conv_tol` = 1e-3; double :ref:`init_f0` = 0.0; }; .. _details-structgpr_1_1laplace_1_1_stein_variational_config: 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 ------ .. index:: pair: variable; n_iterations .. _doxid-structgpr_1_1laplace_1_1_stein_variational_config_1a2d50dd25f554b7517320ae3dfd753c87: .. ref-code-block:: cpp :class: doxyrest-title-code-block 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 :ref:`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. .. index:: pair: variable; step_size .. _doxid-structgpr_1_1laplace_1_1_stein_variational_config_1a4344c307c815f9d9163199db09d56cf8: .. ref-code-block:: cpp :class: doxyrest-title-code-block double step_size = 0.05 eps gradient step (Liu-Wang 0.1 with AdaGrad; we use 0.05 fixed) .. index:: pair: variable; conv_tol .. _doxid-structgpr_1_1laplace_1_1_stein_variational_config_1a96140a142e0b23663b6cefca18e89f9c: .. ref-code-block:: cpp :class: doxyrest-title-code-block double conv_tol = 1e-3 early-stop on max particle move .. index:: pair: variable; init_f0 .. _doxid-structgpr_1_1laplace_1_1_stein_variational_config_1af2a2ce339ebdf95abc752339c9962939: .. ref-code-block:: cpp :class: doxyrest-title-code-block double init_f0 = 0.0 CCD init radius; 0 = sqrt(p + 2).