Skip to main content

Crate gam_problem

Crate gam_problem 

Source
Expand description

Shared REML/LAML contract types.

These are the family-facing interfaces for REML outer assembly. They live below solver so families can construct operator-backed derivative payloads without importing solver::estimate::reml::reml_outer_engine.

Re-exports§

pub use riemannian_retraction::LatentRetractionRegistry;
pub use row_measure::RowSubsampleMask;
pub use basis_error::BasisError;
pub use block_count_error::BlockCountMismatch;
pub use block_role::BlockRole;
pub use block_spec::AdditiveBlockJacobian;
pub use block_spec::BlockEffectiveJacobian;
pub use block_spec::BlockGeometryDirectionalDerivative;
pub use block_spec::BlockWorkingSet;
pub use block_spec::FamilyChannelHessian;
pub use block_spec::FamilyLinearizationState;
pub use block_spec::GaugeComposedJacobian;
pub use block_spec::ParameterBlockSpec;
pub use block_spec::ParameterBlockState;
pub use block_spec::RowScaledJacobian;
pub use block_spec::TensorChannelHessian;
pub use coefficient_prior_mean::CoefficientPriorMean;
pub use coefficient_prior_mean::PriorMeanError;
pub use custom_family_blockwise::CUSTOM_FAMILY_RIDGE_FLOOR;
pub use custom_family_blockwise::CUSTOM_FAMILY_WEIGHT_FLOOR;
pub use custom_family_blockwise::ExactNewtonOuterCurvature;
pub use custom_family_blockwise::validate_blockspec_consistency;
pub use custom_family_error::CustomFamilyError;
pub use dispersion::Dispersion;
pub use dispersion_cov::DispersionExt;
pub use dispersion_cov::PhiScaledCovariance;
pub use dispersion_cov::UnscaledPrecision;
pub use dispersion_cov::se_from_covariance;
pub use estimation_error::EstimationError;
pub use execution_path::ExecutionPath;
pub use family_options::ExactNewtonOuterObjective;
pub use family_options::ExactOuterDerivativeOrder;
pub use finite_validation::bail_if_cached_beta_non_finite;
pub use finite_validation::ensure_finite_scalar;
pub use finite_validation::ensure_finite_scalar_estimation;
pub use finite_validation::validate_all_finite;
pub use finite_validation::validate_all_finite_estimation;
pub use fisher_rao::FisherRaoDefiniteness;
pub use fisher_rao::normalize_fisher_rao_blocks;
pub use fisher_rao::normalize_fisher_rao_blocks_pd;
pub use gauge::Gauge;
pub use identifiability_audit::AliasedPair;
pub use identifiability_audit::BlockIdentity;
pub use identifiability_audit::DroppedColumn;
pub use identifiability_audit::IdentifiabilityAudit;
pub use identifiability_audit::MapUniquenessError;
pub use joint_penalty::JointPenaltyBundle;
pub use joint_penalty::JointPenaltyError;
pub use joint_penalty::JointPenaltySpec;
pub use monotone_root_error::MonotoneRootError;
pub use penalty_coordinate::PenaltyCoordinate;
pub use penalty_matrix::PenaltyMatrix;
pub use psi_design_contract::CustomFamilyBlockPsiDerivative;
pub use psi_design_contract::CustomFamilyPsiDerivativeOperator;
pub use psi_design_contract::JointHessianSourcePreference;
pub use psi_design_contract::MaterializablePsiDerivativeOperator;
pub use psi_design_contract::MaterializationIntent;
pub use psi_design_contract::SharedDerivativeBlocks;
pub use psi_terms::ExactNewtonJointPsiSecondOrderContracted;
pub use psi_terms::ExactNewtonJointPsiSecondOrderTerms;
pub use psi_terms::ExactNewtonJointPsiTerms;
pub use psi_terms::ExactNewtonJointPsiWorkspace;
pub use row_metric::MetricProvenance;
pub use row_metric::RowMetric;
pub use row_metric::WeightField;
pub use schedule::GumbelTemperatureSchedule;
pub use schedule::ScheduleKind;
pub use schedule::SearchStrategy;
pub use solver_contract::DeclaredHessianForm;
pub use solver_contract::Derivative;
pub use solver_contract::EfsEval;
pub use solver_contract::HessianResult;
pub use solver_contract::OuterEval;
pub use solver_contract::OuterHessianMaterialization;
pub use solver_contract::OuterHessianOperator;
pub use solver_contract::OuterStrategyError;
pub use types::*;

Modules§

basis_error
Leaf error type for basis construction.
block_count_error
Neutral block-count arity mismatch carrier.
block_role
block_spec
Data model for the blockwise carrier (subset moved down to gam-problem): parameter-block specs, the effective-Jacobian and channel-Hessian abstractions, per-block working sets and states, and the block geometry directional derivative.
coefficient_prior_mean
Neutral programmatic prior-mean type for a coefficient penalty block.
custom_family_blockwise
Neutral blockwise custom-family contract primitives shared by the CustomFamily trait layer (gam-model-api) and the solver (gam-solve): the IRLS weight / ridge floors, the block-spec consistency validator, and the exact-Newton outer-curvature payload.
custom_family_error
Custom-family error type and its String conversions.
diagnostics
Analytic diagnostic helpers for LAML/REML optimization.
dispersion
Dispersion/scale contract used by covariance and reference-distribution code.
dispersion_cov
Newtype wrappers that disambiguate the two coefficient-space second-order quantities used throughout inference.
estimation_error
execution_path
Execution-path telemetry for hot solver/GPU paths.
family_options
Fit-time outer-objective and exact-derivative-order declarations shared by the custom-family solver entry points.
finite_validation
Shared finite-value validation helpers for estimation/result contracts.
fisher_rao
Fisher–Rao precision-weight normalization for response-geometry REML.
gauge
identifiability_audit
Pure-data identifiability-audit result types.
joint_penalty
Joint (cross-block) penalty specifications.
laplace_sampler_contract
Laplace-correction / mode-posterior sampler contract (trait-inversion #1521).
monotone_root_error
outer_subsample
Outer-loop row subsampling primitive shared across the solver and the family-specific outer-score evaluators.
penalty_coordinate
Neutral penalty-coordinate contract (moved from solver::reml::reml_outer_engine under #1521). The enum is pure data; its operators use only gam-problem’s own dense linalg helpers, so hosting it here lets the criterion/solver layers share one definition without an upward edge into the engine.
penalty_matrix
The PenaltyMatrix carrier (dense / Kronecker / scaled) used by every custom-family block, plus its constructors and the Array2 conversion.
psi_design_contract
The neutral ψ (hyperparameter) design-derivative contract carriers and operator traits shared by the CustomFamily trait layer (gam-model-api) and the solver: the per-block ψ-derivative carrier, the matrix-free CustomFamilyPsiDerivativeOperator trait (+ its dense-materialization extension), and the joint-Hessian source-preference / materialization-intent enums.
psi_terms
Exact-Newton joint-ψ term carriers and the joint-ψ workspace trait.
rho_posterior
ρ-posterior certificate / escalation DATA types (contract-down #1521).
riemannian_retraction
row_measure
Row-subsample mask handle for trust-region invariant enforcement.
row_metric
RowMetric — the single provenance-carrying per-row inner product shared by the SAE-manifold likelihood (residual whitening) and the gauge (isometry pullback weight).
schedule
solver_contract
Outer-objective contract (lower shared layer)
topology_certificates
The unified certificate contract (task #16).
types

Macros§

bail_dim_basis
bail_dim_custom
bail_invalid_basis
bail_invalid_estim

Structs§

BlockLocalDrift
ContractedPsiSecondOrder
DenseMatrixHyperOperator
HyperCoord
HyperCoordDrift
HyperCoordPair
LinearInequalityConstraints
ProjectedFactorCache
Memoizer for projected factor products keyed on a (design, factor) fingerprint.
ProjectedFactorKey
SeedConfig

Enums§

DriftDerivResult
EvalMode
Evaluation mode for the unified evaluator.
PseudoLogdetMode
How the penalized Hessian’s log-determinant and derivatives treat the spectrum below the stability floor.
SeedRiskProfile

Traits§

HyperOperator

Functions§

clamp_seed_rho_to_bounds
in_nested_parallel_region
true when the current thread is inside at least one [NestedParallelGuard] scope, i.e. a parallel row reduction is already in flight on this thread.
normalize_seed_bounds
with_nested_parallel
Run body with the current thread marked as inside a data-parallel row region, so any faer GEMM it issues (directly or transitively) pins to Par::Seq via effective_global_parallelism instead of re-fanning the global Rayon pool. The guard is held for exactly the duration of body and dropped on return — including early ? returns from inside body, since the guard lives in this function’s frame.

Type Aliases§

ContractedPsiSecondOrderFn
FixedDriftDerivFn