Expand description
Central authority for outer smoothing-parameter optimization strategy.
Every path that optimizes smoothing parameters (standard REML, link-wiggle,
GAMLSS custom family, spatial kappa, etc.) declares its derivative
capability here and receives an OuterPlan that determines which solver
and Hessian source to use.
§Design invariant
The planner never synthesizes numerical Hessians. If a path cannot provide
an analytic Hessian, that fact is visible in its
OuterCapability declaration and in the resulting OuterPlan, which
falls back to BFGS or an EFS variant instead of synthesizing second-order
curvature numerically.
Re-exports§
pub use crate::model_types::CriterionCertificate;
Structs§
- Closure
Objective - Closure-based adapter for
OuterObjective. - EfsEval
- Result bundle returned by the EFS (extended Fellner–Schall) evaluation path. Pure data: families compute the additive step and the optional curvature/gradient diagnostics; the solver consumes them.
- Outer
Capability - Outer
Eval - Shared outer-objective result used by optimizer-facing objective implementations.
- Outer
Gradient FdAudit - Result of a component-by-component finite-difference audit of an outer REML/LAML gradient at a fixed θ, plus the outer-Hessian eigenvalues.
- Outer
Gradient FdComponent - Per-θ component of an outer-gradient finite-difference audit.
- Outer
Plan - The outer optimization plan. Produced by
plan, consumed by the runner. - Outer
Problem - Declarative outer-problem builder. Produces both the
OuterCapability(what the objective can provide) and the [OuterConfig] (how the runner should behave) from a small set of high-level declarations. - Outer
Result - Result of a completed outer optimization.
- Outer
Theta Layout
Enums§
- Declared
Hessian Form - Capability-time declaration of what shape the outer Hessian takes.
Replaces the binary
Derivativefor the Hessian field onOuterCapability: callers that know the shape upfront declare it here, and the planner routes between dense ARC and matrix-free trust-region before seed evaluation rather than dynamically branching onseed_eval.hessianat runtime. - Derivative
- Whether an analytic derivative is available for a given order.
- Fallback
Policy - Whether outer_strategy should automatically derive a retry ladder from the primary capability, or disable retries entirely.
- Hessian
Result - Explicit Hessian result replacing
Option<Array2<f64>>. - Hessian
Source - How the Hessian will be obtained for the outer optimizer.
- Outer
Eval Order - Requested derivative order for an outer objective evaluation.
- Outer
Hessian Materialization - Exact dense-materialization route exposed by an outer Hessian operator.
- Outer
Strategy Error - Typed error for the outer-strategy Hessian-operator surface.
- Seed
Outcome - Outcome of
OuterObjective::seed_inner_state. - Solver
- Which solver algorithm to use for the outer optimization.
Traits§
- Outer
Hessian Operator - Matrix-free outer Hessian operator.
- Outer
Objective - Common interface for outer smoothing-parameter objectives.
Functions§
- arm_
outer_ wall_ clock_ deadline - Arm the global outer wall-clock deadline for the current fit.
pubso FFI fit entries (the SAE manifold fit is orchestrated from thegam-pyfficrate) can bound their outer search the same way the in-crate survival entry does (seesurvival/marginal_slope/fit_entry.rs). - cache_
entry_ would_ help_ outer - clear_
outer_ wall_ clock_ deadline - Clear the armed deadline. Call on EVERY exit path of the arming fit.
pubfor the same FFI-entry reason asarm_outer_wall_clock_deadline. - log_
plan - Log the outer optimization plan. Called once per fit at the start of outer optimization so the user can see what strategy was selected and why.
- outer_
gradient_ fd_ audit - Run a component-by-component central finite-difference audit of an outer REML/LAML gradient at a fixed θ₀.
- outer_
wall_ clock_ deadline_ exceeded - True once an armed deadline has passed;
falsewhen none is armed, so every path that does not opt in is byte-for-byte unchanged. - plan
- Select the outer optimization strategy from the declared capability.