pub struct OuterGradientFdAudit {
pub value: f64,
pub components: Vec<OuterGradientFdComponent>,
pub hessian_eigenvalues: Vec<f64>,
}Expand description
Result of a component-by-component finite-difference audit of an outer REML/LAML gradient at a fixed θ, plus the outer-Hessian eigenvalues.
This is the discriminating diagnostic that forks the two failure modes of a
non-terminating outer loop: an objective↔gradient desync (analytic ≠ FD
on some component → the trust region chases a phantom descent direction
forever) versus weak identifiability (analytic ≈ FD everywhere but a
near-zero outer-Hessian eigenvalue → a genuinely flat valley the optimizer
crawls along). It is family-agnostic: any path that exposes an outer
evaluator closure θ ↦ (V, ∇V, H) can call it.
Fields§
§value: f64Outer criterion value at θ₀.
components: Vec<OuterGradientFdComponent>Per-coordinate analytic-vs-FD comparison.
hessian_eigenvalues: Vec<f64>Eigenvalues of the (symmetrized) outer Hessian at θ₀, ascending. Empty when no analytic/operator Hessian was available.
Implementations§
Source§impl OuterGradientFdAudit
impl OuterGradientFdAudit
Sourcepub fn analytic_block_norms(&self) -> Vec<(String, f64)>
pub fn analytic_block_norms(&self) -> Vec<(String, f64)>
Per-block L2 norm of the analytic gradient.
Sourcepub fn worst_component(&self) -> Option<&OuterGradientFdComponent>
pub fn worst_component(&self) -> Option<&OuterGradientFdComponent>
Worst per-coordinate analytic−FD gap and its component.
Sourcepub fn min_abs_eigenvalue(&self) -> Option<f64>
pub fn min_abs_eigenvalue(&self) -> Option<f64>
Smallest-magnitude outer-Hessian eigenvalue (flatness proxy).
Sourcepub fn log_verdict(&self, context: &str)
pub fn log_verdict(&self, context: &str)
Emit a single human-readable verdict block to the log.
Trait Implementations§
Source§impl Clone for OuterGradientFdAudit
impl Clone for OuterGradientFdAudit
Source§fn clone(&self) -> OuterGradientFdAudit
fn clone(&self) -> OuterGradientFdAudit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for OuterGradientFdAudit
impl RefUnwindSafe for OuterGradientFdAudit
impl Send for OuterGradientFdAudit
impl Sync for OuterGradientFdAudit
impl Unpin for OuterGradientFdAudit
impl UnsafeUnpin for OuterGradientFdAudit
impl UnwindSafe for OuterGradientFdAudit
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.