Skip to main content

OuterCapability

Struct OuterCapability 

Source
pub struct OuterCapability {
    pub gradient: Derivative,
    pub hessian: DeclaredHessianForm,
    pub n_params: usize,
    pub psi_dim: usize,
    pub fixed_point_available: bool,
    pub barrier_config: Option<BarrierConfig>,
    pub prefer_gradient_only: bool,
    pub disable_fixed_point: bool,
}

Fields§

§gradient: Derivative§hessian: DeclaredHessianForm

Declared shape of the analytic Hessian (or its absence). Replaces the binary Derivative so the planner can route between dense ARC and matrix-free trust-region before seed evaluation. See DeclaredHessianForm.

§n_params: usize

Number of smoothing (+ any auxiliary hyper-) parameters being optimized.

§psi_dim: usize

Number of ψ (design-moving) coordinates among the extended hyperparameter coordinates. When 0, all coords are penalty-like and pure EFS is eligible (given fixed_point_available). When > 0, hybrid EFS is eligible instead: EFS for ρ + preconditioned gradient for ψ.

§Hybrid EFS strategy (when psi_dim > 0)

Enabled when psi_dim > 0, n_params > SMALL_OUTER_BFGS_MAX_PARAMS, and fixed_point_available. Combines:

  • Standard EFS multiplicative fixed-point updates for ρ coordinates
  • Safeguarded preconditioned gradient steps for ψ coordinates: Δψ = -α G⁺ g_ψ where G is the trace Gram matrix

Mathematically necessary because no EFS-type fixed-point iteration exists for indefinite B_ψ (see response.md Section 2). The structural requirement for EFS is H^{-1/2} B_d H^{-1/2} ≽ 0 (PSD) plus fixed nullspace — exactly what penalty-like coords satisfy and design-moving coords do not.

The hybrid is O(1) H⁻¹ solves per iteration (same as pure EFS), compared to O(dim(θ)) for BFGS.

§fixed_point_available: bool

Whether the objective actually implements eval_efs() for fixed-point plans. Structural eligibility (psi_dim == 0 / psi_dim > 0) is not sufficient by itself: if this is false, the planner must stay on Newton/BFGS-style plans even when EFS or Hybrid-EFS would otherwise be mathematically admissible.

§barrier_config: Option<BarrierConfig>

Optional log-barrier configuration for structural monotonicity constraints. When present, EFS is still eligible at plan time, but the EFS iteration loop performs a quantitative check each step: if barrier_curvature_is_significant(β, ref_diag, threshold) fires, EFS is abandoned and the fallback ladder routes to a first-order joint optimizer.

Previously this was a binary barrier_active: bool that unconditionally blocked EFS. The quantitative check allows EFS when constraints exist but the barrier curvature is negligible (coefficients far from their bounds).

§prefer_gradient_only: bool

Policy hint for derivative-free auxiliary optimizers only. Primary REML optimization ignores this flag when an analytic Hessian exists: exact second-order geometry must not be hidden behind a quasi-Newton policy.

§disable_fixed_point: bool

Policy hint: even when the objective implements eval_efs() and the coordinate structure is penalty-like, the planner must NOT select EFS/HybridEfs for this problem.

Set by the caller for problem classes where the Wood-Fasiolo structural property (H^{-1/2} B_k H^{-1/2} ≽ 0 plus parameter-independent nullspace) is known not to hold — e.g. GAMLSS/location-scale families where the joint Hessian is β-dependent and cross-block smoothers induce non-diagonal curvature that the EFS multiplicative fixed-point cannot resolve. Also set by the automatic fallback cascade when an EFS/HybridEfs attempt failed to converge, so the next attempt falls back to analytic-gradient BFGS rather than retrying EFS.

Implementations§

Source§

impl OuterCapability

Source

pub const fn theta_layout(&self) -> OuterThetaLayout

Source

pub fn validate_layout(&self, context: &str) -> Result<(), EstimationError>

Source

pub const fn all_penalty_like(&self) -> bool

True when all coordinates are penalty-like (no ψ coords).

Source

pub const fn has_psi_coords(&self) -> bool

True when ψ (design-moving) coordinates are present.

Trait Implementations§

Source§

impl Clone for OuterCapability

Source§

fn clone(&self) -> OuterCapability

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OuterCapability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ByRef<T> for T

Source§

fn by_ref(&self) -> &T

Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DistributionExt for T
where T: ?Sized,

Source§

fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> T
where Self: Distribution<T>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Imply<T> for U
where T: ?Sized, U: ?Sized,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V