Expand description
Library-side orchestration for NUTS posterior sampling from a saved model.
The CLI’s gam sample subcommand and the Python Model.sample(...) API
both call into sample_saved_model, which dispatches on the saved
model’s class (standard GLM, standard with link-wiggle, or survival) and
returns a fully-converged NutsResult over the original coefficient
space. Gaussian identity standard models are sampled from the saved
closed-form posterior, conditioning on the training fit rather than any
prediction rows supplied by the caller.
Re-exports§
pub use super::hmc_io::NutsConfig;pub use super::hmc_io::NutsResult;
Functions§
- laplace_
gaussian_ fallback - Draw iid samples from
N(mode, H^{-1})using the saved penalised HessianH = L L^T. - sample_
saved_ model - Run NUTS posterior sampling over a saved model.
- saved_
baseline_ timewiggle_ spec - Reconstruct the
LinkWiggleFormulaSpecfrom a saved model’s baseline-time-wiggle runtime, returningNonewhen the model has no time-wiggle component. Re-exported because the survival fitter’s tests exercise the spec independently of running NUTS.