pub enum InferenceCovarianceMode {
Conditional,
SmoothingCorrected,
}Expand description
Which posterior covariance definition an uncertainty surface was built from.
This is the library’s ONE covariance-definition vocabulary, and it lives
here — beside SmoothingCorrectionMethod, which names how the correction
was produced — rather than in a predict-layer crate, so that every consumer
of a fit can say which of the two matrices it read. A family that owns its
own predict surface (the multinomial) sits BELOW gam-predict in the crate
graph; when this enum lived up there, that family had no way to express the
distinction and quietly published conditional-only bands while every other
family defaulted to Self::SmoothingCorrected (gam#2612).
Variants§
Conditional
Use conditional posterior covariance only: Var(beta | lambda_hat) ~= H_{rho_hat}^{-1}.
SmoothingCorrected
Require first-order smoothing-corrected covariance: Var(beta) ~= H_{rho_hat}^{-1} + J Var(rho_hat) J^T. Absence is an error; this mode never substitutes conditional covariance.
Implementations§
Trait Implementations§
Source§impl Clone for InferenceCovarianceMode
impl Clone for InferenceCovarianceMode
Source§fn clone(&self) -> InferenceCovarianceMode
fn clone(&self) -> InferenceCovarianceMode
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 InferenceCovarianceMode
Source§impl Debug for InferenceCovarianceMode
impl Debug for InferenceCovarianceMode
Source§impl<'de> Deserialize<'de> for InferenceCovarianceMode
impl<'de> Deserialize<'de> for InferenceCovarianceMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InferenceCovarianceMode
Source§impl FromStr for InferenceCovarianceMode
impl FromStr for InferenceCovarianceMode
Source§fn from_str(raw: &str) -> Result<Self, Self::Err>
fn from_str(raw: &str) -> Result<Self, Self::Err>
The one public vocabulary for the covariance-mode knob across every
surface (gam predict --covariance-mode, Python covariance_mode).
The CLI historically said “corrected” and the Python bindings said
“smoothing” for the SAME mode; both spellings (plus the enum’s own
canonical “smoothing-corrected”) are accepted here so the vocabulary
cannot drift per frontend again. Unknown strings are a hard error so a
typo never silently degrades to a default covariance.
Source§impl PartialEq for InferenceCovarianceMode
impl PartialEq for InferenceCovarianceMode
Source§impl Serialize for InferenceCovarianceMode
impl Serialize for InferenceCovarianceMode
impl StructuralPartialEq for InferenceCovarianceMode
Auto Trait Implementations§
impl Freeze for InferenceCovarianceMode
impl RefUnwindSafe for InferenceCovarianceMode
impl Send for InferenceCovarianceMode
impl Sync for InferenceCovarianceMode
impl Unpin for InferenceCovarianceMode
impl UnsafeUnpin for InferenceCovarianceMode
impl UnwindSafe for InferenceCovarianceMode
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.