Skip to main content

Module model_types

Module model_types 

Source
Expand description

Re-exported for the Python bindings (gam-pyffi), which build their analytic-penalty registry through the single shared descriptor parser that also serves the in-process workflow pipeline. Exposed here so PyFFI can name it without the (crate-private) workflow module being publicly reachable.

§Shared model-estimation contract types

Lower-layer types that both the families layer (which constructs penalty and dispersion specifications and propagates estimation errors) and the solver layer (which consumes them) need to name. Hosting them here breaks the families → solver::estimate back-edge that #1135 tracks: families now import these from crate::model_types instead of reaching up into crate::solver::estimate.

§Layering

These types depend only on lower or sibling layers (linalg, terms, families’ error types) — never on solver. EstimationError carries #[from] conversions for the family error types it wraps, which is the allowed downward direction.

Structs§

ActiveLinearConstraintBlock
Active row block of the joint linear inequality constraint matrix at the converged inner iterate.
AdaptiveRegularizationOptions
CriterionCertificate
First-order optimality certificate: gradient-vs-objective FD audit at the returned optimum (#934).
FitArtifacts
Post-fit artifacts needed by downstream diagnostics/inference without re-running PIRLS.
FitGeometry
Working-set geometry at convergence needed by ALO and other post-fit diagnostics. Only populated when the inner solver provides the data.
FitInference
FitOptions
FittedBlock
Inference quantities for one coefficient block.
ProjectedKktResidual
KKT residual r = grad_beta L_pen(beta_hat) at the converged inner iterate, tagged with the exact represented subspace.
UnifiedFitResult
Unified fit result for all model types (standard GAM, GAMLSS, survival).
UnifiedFitResultParts

Enums§

BlockRole
Role of a coefficient block within a multi-parameter model.
CoefficientPriorMean
Programmatic prior mean for a coefficient penalty block.
Dispersion
Dispersion contract used by inferential covariance and reference distributions.
EstimationError
A comprehensive error type for the model estimation process.
ExecutionPath
Truthful execution-path classifier for a fit’s hot inner solve (issue #1017).
FittedLinkState
KktResidualSubspace
Subspace represented by a stored KKT residual.
PenaltySpec
A penalty specification for the public estimate API.

Functions§

ensure_finite_scalar
Public wrapper returning String errors for use outside the estimation module.
saved_latent_cloglog_state_from_fit
saved_mixture_state_from_fit
saved_sas_state_from_fit
validate_all_finite
Public wrapper returning String errors for use outside the estimation module.
validate_dense_hessian_export
Validate the structural integrity of an exported penalized Hessian.
validate_explicit_dense_hessian_for_whitening
Validate that a saved penalized Hessian is an explicit dense precision matrix suitable for HMC/NUTS whitening.