pub enum CurvatureEvidence {
Measured {
psd: bool,
},
NotSpent,
NotAvailable,
NoEstimand,
CriterionContradicted,
}Expand description
What curvature evidence a certificate actually has (#2561).
This was Option<bool>, and its None carried FOUR structurally different
meanings that OuterCriterionCertificate::curvature_admissible accepted
alike:
- a multi-start screening pass deliberately declined to spend the
order-four derivative ladder (
Self::NotSpent); - the route exposes no analytic Hessian at all (
Self::NotAvailable); - the EFS/fixed-point route, which has none by construction (same);
- there is no outer estimand to have curvature (
Self::NoEstimand).
Case 1 is deliberate and documented — screening is a first-order gate, and
“the one order-four evaluation belongs to the winner”. But that design also
promises the winner’s verdict is the one that mints, and while None meant
all four things at once, nothing could check it: a Mint-fidelity refusal to
measure was byte-identical to a screening pass that chose not to. Naming the
states makes that promise assertable.
Acceptance is unchanged. Only Self::Measured with psd: false is a
negative verdict; every other state passes, exactly as != Some(false) did.
§Serialized form
Serializes as the legacy Option<bool> under the legacy key, because
hessian_psd is a published Python contract (gamfit/_summary.py) whose
domain is null | true | false, and because stored model bytes carry this
field with no version tag. The round trip is therefore deliberately LOSSY:
NotSpent and NoEstimand both reload as NotAvailable. That is sound
because the three are acceptance-identical, and screening certificates are
never persisted — only the winner mints.
Variants§
Measured
A Hessian existed at the certified point and was tested.
NotSpent
A screening pass declined to spend the order-four ladder. A certificate
minted at CertificationFidelity::Mint must never carry this.
NotAvailable
The route exposes no analytic Hessian, so there was nothing to test.
NoEstimand
A zero-dimensional outer problem: no estimand, so no curvature exists
to be admissible or otherwise. Distinct from Self::NotAvailable,
which means a curvature question existed and could not be answered.
CriterionContradicted
A Hessian was measured, reported a negative direction, and the criterion itself was then asked about that direction and did not fall (#2612).
The escape steps ρ ± αv along the reported minimum eigenvector, in
both signs, from one e-fold down to the step at which the quadratic
model’s own predicted decrease ½|λ_min|α² reaches the criterion’s
resolution. Below that step the claim predicts nothing the criterion can
represent, so that ladder covers the claim’s WHOLE falsifiable range. A
direction that lowers the objective nowhere in it is not a descent
direction of this criterion, whatever the matrix says.
This is a statement about the MATRIX, not about the point, and it is the
reason the second-order conjunct does not refuse here: refusing would
spend evidence the criterion has just contradicted. It is deliberately
NOT Self::Measured with psd: true — nothing established that the
point is a minimum either; what was established is that this Hessian’s
negative direction has no operational content.
Reachable only where an analytic Hessian exists AND the objective can be re-evaluated at trial points, which is exactly where the escape runs.
Serializes as null under the legacy hessian_psd key and reloads as
Self::NotAvailable — the same deliberate lossiness the module doc
already records for NotSpent/NoEstimand, and sound for the same
reason: the four are acceptance-identical, and the adjudication is a
statement about a run, not a property of a stored model.
Implementations§
Source§impl CurvatureEvidence
impl CurvatureEvidence
Sourcepub fn psd(self) -> Option<bool>
pub fn psd(self) -> Option<bool>
The raw PSD verdict when one was measured, None otherwise — the
legacy projection, and what the published hessian_psd surface shows.
Sourcepub fn was_measured(self) -> bool
pub fn was_measured(self) -> bool
Whether a curvature question was actually answered here.
Self::CriterionContradicted answers false: a Hessian was measured
there, but its verdict was withdrawn by the criterion, so no curvature
ANSWER survives. Reporting true would let a consumer that asked for a
real second-order guarantee read a withdrawn verdict as a delivered one,
which is the #2578 conflation one variant further along.
Sourcepub fn from_measurement(psd: Option<bool>) -> CurvatureEvidence
pub fn from_measurement(psd: Option<bool>) -> CurvatureEvidence
Build from a raw optional measurement: Some was measured, None
means the route had no analytic Hessian to test. Sites that mean
Self::NotSpent or Self::NoEstimand must say so explicitly —
that is the point of the type.
Trait Implementations§
Source§impl Clone for CurvatureEvidence
impl Clone for CurvatureEvidence
Source§fn clone(&self) -> CurvatureEvidence
fn clone(&self) -> CurvatureEvidence
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for CurvatureEvidence
Source§impl Debug for CurvatureEvidence
impl Debug for CurvatureEvidence
Source§impl<'de> Deserialize<'de> for CurvatureEvidence
impl<'de> Deserialize<'de> for CurvatureEvidence
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CurvatureEvidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CurvatureEvidence, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for CurvatureEvidence
impl Display for CurvatureEvidence
impl Eq for CurvatureEvidence
Source§impl PartialEq for CurvatureEvidence
impl PartialEq for CurvatureEvidence
Source§impl Serialize for CurvatureEvidence
impl Serialize for CurvatureEvidence
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,
impl StructuralPartialEq for CurvatureEvidence
Auto Trait Implementations§
impl Freeze for CurvatureEvidence
impl RefUnwindSafe for CurvatureEvidence
impl Send for CurvatureEvidence
impl Sync for CurvatureEvidence
impl Unpin for CurvatureEvidence
impl UnsafeUnpin for CurvatureEvidence
impl UnwindSafe for CurvatureEvidence
Blanket Implementations§
impl<T> Allocation for T
impl<T> Boilerplate 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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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,
impl<T> Scalar for T
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.