pub enum TransformationNormalError {
InvalidInput {
reason: String,
},
DesignDegenerate {
reason: String,
},
NonFinite {
reason: String,
},
MonotonicityViolated {
reason: String,
},
NumericalFailure {
reason: String,
},
}Expand description
Typed errors emitted by the transformation-normal family pipeline.
Each variant carries a pre-formatted reason so Display is
byte-equivalent to the original format!(...) strings the module used
before the typed-error migration. The category split lets callers
pattern-match on the failure kind (e.g. distinguish a degenerate
covariate design from a non-finite intermediate) without parsing text.
Public/trait boundaries (e.g. CustomFamily::evaluate) still return
Result<_, String>; the From<TransformationNormalError> for String
impl below provides the shim so every typed error flushes through ?
or .into() at the boundary without per-callsite .map_err.
Variants§
InvalidInput
Shape/length/dimension/contract violations on inputs to a routine (e.g. response/covariate row mismatch, beta length mismatch, wrong number of blocks, malformed configuration parameters).
DesignDegenerate
A required covariate design or weight configuration cannot support the routine — empty design, zero total weight, residual variance not representable, warm-start coefficients all non-finite.
NonFinite
A numeric intermediate (response transform, derivative, log-likelihood, weight, offset, gradient component, calibration quantity) came out non-finite or non-positive where positive finite is required.
MonotonicityViolated
The fitted monotone transform’s derivative dropped to or below zero, or the response endpoint ordering required by the latent score (lower < h < upper) was not satisfied at evaluation time.
NumericalFailure
A numerical step that maps through the standard-normal CDF (endpoint mass, log-difference, PIT probability, derivative ratio) underflowed or became non-representable at the requested arguments.
Trait Implementations§
Source§impl Clone for TransformationNormalError
impl Clone for TransformationNormalError
Source§fn clone(&self) -> TransformationNormalError
fn clone(&self) -> TransformationNormalError
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 TransformationNormalError
impl Debug for TransformationNormalError
Source§impl Display for TransformationNormalError
impl Display for TransformationNormalError
Source§impl Error for TransformationNormalError
impl Error for TransformationNormalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BlockCountMismatch> for TransformationNormalError
impl From<BlockCountMismatch> for TransformationNormalError
Source§fn from(err: BlockCountMismatch) -> TransformationNormalError
fn from(err: BlockCountMismatch) -> TransformationNormalError
Source§impl From<TransformationNormalError> for String
impl From<TransformationNormalError> for String
Source§fn from(err: TransformationNormalError) -> String
fn from(err: TransformationNormalError) -> String
Auto Trait Implementations§
impl Freeze for TransformationNormalError
impl RefUnwindSafe for TransformationNormalError
impl Send for TransformationNormalError
impl Sync for TransformationNormalError
impl Unpin for TransformationNormalError
impl UnsafeUnpin for TransformationNormalError
impl UnwindSafe for TransformationNormalError
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.