Skip to main content

gam_solve/inference/
mod.rs

1//! Inference-tier numerics that are genuine gam-solve criterion math
2//! (descended #1521): leaf evidence/diagnostic computations whose dependencies
3//! are all at or below the gam-solve tier (`estimate`, `pirls`, `sensitivity`,
4//! `mixture_link`, `gam-linalg`, `gam-problem`). The monolith crate root
5//! re-exports this subtree as `gam::inference::*`, so existing callers
6//! (`gam::inference::alo`, …) resolve unchanged.
7
8/// Approximate-leave-one-out (ALO) REML-evidence diagnostics. Descended from the
9/// monolith `inference::alo` (#1521): its only dependencies are the gam-solve
10/// `estimate`/`pirls`/`sensitivity`/`mixture_link` modules plus `gam-linalg`
11/// and `gam-problem` — all at or below the gam-solve tier.
12pub mod alo;
13
14/// Margin-resolved [`Verdict`](gam_problem::topology_certificates::Verdict)
15/// mappings for the two gam-solve-tier certificates consumed by
16/// [`crate::topology_selector`]. Descended from the monolith
17/// `inference::certificate_impls` (#1521): the two helpers here depend only on
18/// gam-solve-tier types (`logdet_bounds`, `row_sampling_measure`) plus the
19/// contracted-down certificate ladder — they do NOT pull `gam_sae`, so no
20/// trait inversion is needed (the gam-sae `impl Certificate for …` blocks stay
21/// in the monolith).
22pub mod certificate_impls;
23
24/// Structured residual-covariance estimator (#974) and the single producer of
25/// [`MetricProvenance::WhitenedStructured`](gam_problem::MetricProvenance::WhitenedStructured).
26/// Descended from the monolith `inference::residual_factor` (#1521): its only
27/// dependencies are `gam_problem::RowMetric` plus `gam-linalg`
28/// (`faer_ndarray::{FaerCholesky, FaerEigh}`) — all at or below the gam-solve
29/// tier. Reached downward from `gam_sae::structure_harvest`; the monolith crate
30/// root re-exports it so `gam::inference::residual_factor` resolves unchanged.
31pub mod residual_factor;
32
33/// Deterministic Pólya–Gamma gate-block evidence (#1016): Schur-eliminates a
34/// logit gate sub-block with a true PG-augmented quadratic. Descended from the
35/// monolith `inference::pg_gate_evidence` (#1521): depends only on
36/// `gam-linalg` (`matrix::FactorizedSystem`, `faer_ndarray`) plus the in-crate
37/// [`pg_moments`]. Reached downward from `gam_sae::structure_harvest`; the
38/// monolith crate root re-exports it so `gam::inference::pg_gate_evidence`
39/// resolves unchanged.
40pub mod pg_gate_evidence;
41
42/// Closed-form Pólya–Gamma moments (#1016). Pure functions of `(b, c)` with no
43/// RNG. Descended from the monolith `inference::pg_moments` (#1521); the
44/// monolith crate root re-exports it so `gam::inference::pg_moments` resolves
45/// unchanged.
46pub mod pg_moments;