Skip to main content

InnerConvergenceTerminalState

Enum InnerConvergenceTerminalState 

Source
pub enum InnerConvergenceTerminalState {
    Blockwise {
        cycle: usize,
        max_accepted_step: f64,
        max_proposed_step: f64,
        step_tol: f64,
        objective_change: f64,
        objective_tol: f64,
        joint_stationarity_ok: bool,
    },
    JointNewton {
        cycle: usize,
        stationarity_residual: f64,
        residual_tol: f64,
        stationarity_scale: f64,
        step_inf: f64,
        step_tol: f64,
        resolvable_negative_curvature: bool,
        best_stationarity_residual: f64,
        cycles_since_best_residual: usize,
        termination_reason: JointNewtonTerminalReason,
    },
}

Variants§

§

Blockwise

The blockwise Gauss-Seidel route’s terminal cycle.

Fields

§cycle: usize
§max_accepted_step: f64
§max_proposed_step: f64
§step_tol: f64
§objective_change: f64
§objective_tol: f64
§joint_stationarity_ok: bool
§

JointNewton

The exact joint-Newton route’s terminal cycle. This route DOES have a genuine stationarity residual (the blockwise one does not, off a converged iterate), and it has a third outcome the other lacks: resolvable_negative_curvature marks a first-order stationary STRICT SADDLE, where the score and the Newton proposal both vanish but the exact penalized Hessian has resolvable negative curvature. That refuses convergence deliberately, and it is nothing like exhausting a budget.

Fields

§cycle: usize
§stationarity_residual: f64
§residual_tol: f64
§stationarity_scale: f64

The magnitude the stationarity residual is denominated against: max(‖∇L‖∞, ‖Sβ‖∞, ‖∇Φ‖∞) at the terminal iterate, i.e. the scale in residual_tol = inner_tol · (1 + scale).

Carried because WITHOUT it the message cannot be ranked (gam#2713). The natural thing to do with a printed residual (tol=…) pair is to form R/T and read it as “N× over tolerance”; that ratio is ≈ (R/scale)/inner_tol, so it mixes two different tolerances (the 1e-6 default and the derivative lane’s 1e-11 JOINT_LAML_DERIV_INNER_TOL_FLOOR) and it is ANTI-correlated with convergence across part of the range. Measured over 41 refusal pairs from one survival sweep: a row printing R/T = 238× was stationary to R/scale = 2.4e-9 — converged to nine digits — while a row printing R/T = 1.4e3× sat at R/scale = 1.4e-3, a million times less converged. Ranking on R/T sends triage to the first row.

The comparable column is relative_stationarity, printed below, which is the gate’s own quantity: the gate accepts exactly when it is ≤ inner_tol, so it is 0 at the optimum, ~1 where the residual has collapsed onto one of its own terms, and directly comparable across both inner_tol regimes.

§step_inf: f64
§step_tol: f64
§resolvable_negative_curvature: bool
§best_stationarity_residual: f64

The smallest stationarity residual this solve actually computed, and how many cycles have passed since it last improved.

The terminal residual alone cannot separate a solve that never got close from one that reached a near-tolerance point and then walked away from it, and those are different defects with different fixes. Measured on the transformation-normal wine arm (#2600): the terminal residual is 1.906e0 while the smallest this same solve computed is 1.578e-3 — 1200x better, within 1.9x of residual_tol, and reached 27 cycles earlier, after which every accepted step raised the residual again. Read from the terminal value alone that solve looks like it never approached stationarity; read with the best value it is a solve that drifted off a point it had essentially reached.

§cycles_since_best_residual: usize
§termination_reason: JointNewtonTerminalReason

Trait Implementations§

Source§

impl Clone for InnerConvergenceTerminalState

Source§

fn clone(&self) -> InnerConvergenceTerminalState

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 Copy for InnerConvergenceTerminalState

Source§

impl Debug for InnerConvergenceTerminalState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Display for InnerConvergenceTerminalState

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for InnerConvergenceTerminalState

Source§

fn eq(&self, other: &InnerConvergenceTerminalState) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for InnerConvergenceTerminalState

Auto Trait Implementations§

Blanket Implementations§

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> Boilerplate for T
where T: Copy + Send + Sync + Debug + PartialEq + 'static,

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<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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