pub struct CriterionCertificate {
pub grad_norm: f64,
pub analytic_directional: f64,
pub fd_directional: f64,
pub fd_error: f64,
pub agreement_z: f64,
pub fd_step: f64,
pub hessian_pd: Option<bool>,
pub lambdas_railed: Vec<usize>,
}Expand description
First-order optimality certificate: gradient-vs-objective FD audit at the returned optimum (#934).
Answers, machine-checkably, the three questions every objective↔gradient
desync postmortem asks: does the analytic gradient match the actual
criterion value HERE (Self::first_order_consistent); is the outer
curvature positive definite HERE (hessian_pd); did any smoothing
coordinate rail to a box bound (lambdas_railed).
Fields§
§grad_norm: f64‖∇F(θ̂)‖₂ from the analytic gradient path at the returned point.
analytic_directional: f64Analytic directional derivative ∇F(θ̂)·v along the audit direction.
fd_directional: f64Richardson-extrapolated central difference of the criterion VALUE path along the same direction: (4·D_h − D_2h)/3 from the h and 2h central-difference pairs.
fd_error: f64Error bar on fd_directional: the Richardson residual |D_h − D_2h|
(which absorbs both truncation and inner-solve value noise) floored
by the central-difference roundoff bound ε·|F|/h.
agreement_z: f64|analytic − fd| / fd_error — standardized disagreement.
fd_step: f64Base central-difference step h along the unit direction.
hessian_pd: Option<bool>Whether the final outer Hessian is positive definite at θ̂, when the
solver tracked one (None when no final Hessian was available).
lambdas_railed: Vec<usize>Leading smoothing coordinates (ρ block) pinned within
[CERTIFICATE_RAIL_MARGIN] of either box bound at the optimum.
Implementations§
Source§impl CriterionCertificate
impl CriterionCertificate
Sourcepub fn first_order_consistent(&self) -> bool
pub fn first_order_consistent(&self) -> bool
Whether the analytic directional derivative agrees with the finite difference of the actual criterion value at the optimum.
Trait Implementations§
Source§impl Certificate for CriterionCertificate
impl Certificate for CriterionCertificate
Source§fn evidence(&self) -> BTreeMap<&'static str, EvidenceValue>
fn evidence(&self) -> BTreeMap<&'static str, EvidenceValue>
Source§fn verdict(&self) -> Verdict
fn verdict(&self) -> Verdict
Verdict::Unavailable /
Verdict::Insufficient rather than a silent pass when the evidence is
missing or below margin.Source§fn ledger_entry(&self) -> LedgerEntry
fn ledger_entry(&self) -> LedgerEntry
Source§impl Clone for CriterionCertificate
impl Clone for CriterionCertificate
Source§fn clone(&self) -> CriterionCertificate
fn clone(&self) -> CriterionCertificate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CriterionCertificate
impl Debug for CriterionCertificate
Source§impl<'de> Deserialize<'de> for CriterionCertificate
impl<'de> Deserialize<'de> for CriterionCertificate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CriterionCertificate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CriterionCertificate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CriterionCertificate
impl Serialize for CriterionCertificate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for CriterionCertificate
impl RefUnwindSafe for CriterionCertificate
impl Send for CriterionCertificate
impl Sync for CriterionCertificate
impl Unpin for CriterionCertificate
impl UnsafeUnpin for CriterionCertificate
impl UnwindSafe for CriterionCertificate
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.