Skip to main content

Module rho_posterior

Module rho_posterior 

Source
Expand description

ρ-posterior certificate / escalation DATA types (contract-down #1521).

These are the plain-data carriers that a fit result STORES (UnifiedFitResult::rho_posterior_{certificate,escalation}) and that the gam-solve REML evaluator returns. The COMPUTATION that produces them — the PSIS certificate, the Tier-1 Gauss-Hermite quadrature, and the Tier-2 NUTS escalation (which pulls the gam-inference hmc_io sampler) — stays UP in the monolith inference::rho_posterior, which re-exports these types so its construction sites name them unchanged. Contract-downed here (the neutral criterion-contract crate) so gam-solve can store/return them without a back-edge into gam-inference.

Structs§

RhoMixtureNode
One node of the criterion-closure Tier-1 mixture (#938): a ρ location, its normalized posterior mass, and the exact profiled criterion value there.
RhoPosteriorCertificate
The Tier-0 ρ-uncertainty certificate for a fit.
RhoPosteriorMixture
Tier-1 deliverable (#938): π(ρ|y) as a discrete mixture of conditional Gaussians, with the posterior moment summary of ρ itself.
RhoPosteriorSamples
Tier-2 deliverable (#938): π(ρ|y) draws from NUTS with the exact profiled gradient, whitened by the exact outer Hessian at ρ̂.

Enums§

RhoCertificate
Reliability tier read off the Pareto tail-shape of the ρ-importance weights.
RhoPosteriorEscalation
The auto-selected escalation outcome when the Tier-0 certificate reads RhoCertificate::Escalate (#938): Tier 1 (deterministic quadrature) for K ≤ 4, Tier 2 (NUTS over ρ) for K ≤ 16, and an HONEST report that escalation is unavailable beyond that — never a silently-degraded answer.

Constants§

ESCALATE_K_HAT
above which the self-normalized importance estimator’s central limit theorem no longer applies and the proposal must be replaced rather than reweighted (Vehtari, Simpson, Gelman, Yao & Gabry, Pareto smoothed importance sampling, JMLR 25(72), 2024, §3): for k > 0.7 the practical pre-asymptotic convergence rate of PSIS collapses and the estimate is declared unreliable. How finely a given draw count can resolve this boundary is NOT a property of the cutoff: gam_solve::psis::shape_resolution reports the standard error of the fitted shape, and a verdict against this cutoff only means something when the truth sits several such standard errors away from it.
PLUG_IN_CERTIFIED_K_HAT
below which the proposal’s importance weights have finite variance (k < 1/2 ⇒ the generalized-Pareto tail has a second moment), so the plug-in answer plus the first-order correction needs no reweighting.

Traits§

RhoPosteriorEscalator
The gam-inference-tier producer of the Tier-0 ρ-certificate and the auto-selected Tier-1/Tier-2 escalation (trait-inversion #1521).

Functions§

rho_posterior_escalator
The registered ρ-posterior certificate/escalation producer, or None when the sampler tier is not linked / not yet initialized (gam-solve then declines the certificate and escalation — a safe no-op leaving plug-in intervals).
set_rho_posterior_escalator
Register the monolith’s hmc_io-backed ρ-posterior certificate/escalation producer. Called once at process init by the gam-inference tier. First writer wins; a later call is ignored (returns Err with the boxed value) so a re-init can never swap a live producer mid-run.