pub enum DispersionFamilyKind {
NegativeBinomial,
Gamma,
Beta,
Tweedie {
p: f64,
},
}Expand description
The genuine-dispersion mean family whose precision (overdispersion) channel
can carry a second noise_formula linear predictor (issue #913).
Variants§
NegativeBinomial
NB2: Var = μ + μ²/θ; the precision channel models log θ.
Gamma
Gamma with Var = μ²/ν; the precision channel models log ν (shape).
Beta
Beta(μφ, (1−μ)φ) with a logit mean link; the precision channel models
log φ.
Tweedie
Tweedie compound Poisson–Gamma with Var = φ μ^p, fixed power p; the
precision channel models log(1/φ). The per-row density uses the
saddlepoint (Nelder–Pregibon) approximation for y > 0 and the exact
point mass at y = 0; this is the standard tractable Tweedie ML
surface (an exact-series φ-derivative is the remaining hard sub-item of
#913).
Implementations§
Source§impl DispersionFamilyKind
impl DispersionFamilyKind
pub const fn family_tag(self) -> &'static str
Sourcepub fn base_link(self) -> InverseLink
pub fn base_link(self) -> InverseLink
The mean inverse link this dispersion family fits on: log for
NegativeBinomial / Gamma / Tweedie, logit for Beta. Single source of
truth shared by the CLI and FFI save paths so the persisted
base_link never diverges from the fitted channel.
Sourcepub fn likelihood_spec(self) -> LikelihoodSpec
pub fn likelihood_spec(self) -> LikelihoodSpec
The family’s canonical [LikelihoodSpec] (mean response × mean link).
The overdispersion parameter is estimated by the log-precision channel,
so the response-family placeholder parameters (phi, theta) mirror
the resolve_family defaults
and are not consumed as fixed values at predict time. This is the single
source of truth for the persisted location-scale likelihood so the CLI
and FFI save paths cannot diverge.
Trait Implementations§
Source§impl Clone for DispersionFamilyKind
impl Clone for DispersionFamilyKind
Source§fn clone(&self) -> DispersionFamilyKind
fn clone(&self) -> DispersionFamilyKind
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 DispersionFamilyKind
Source§impl Debug for DispersionFamilyKind
impl Debug for DispersionFamilyKind
Source§impl PartialEq for DispersionFamilyKind
impl PartialEq for DispersionFamilyKind
Source§fn eq(&self, other: &DispersionFamilyKind) -> bool
fn eq(&self, other: &DispersionFamilyKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DispersionFamilyKind
Auto Trait Implementations§
impl Freeze for DispersionFamilyKind
impl RefUnwindSafe for DispersionFamilyKind
impl Send for DispersionFamilyKind
impl Sync for DispersionFamilyKind
impl Unpin for DispersionFamilyKind
impl UnsafeUnpin for DispersionFamilyKind
impl UnwindSafe for DispersionFamilyKind
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,
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,
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.