pub enum ResolvedLikelihoodScale {
ProfiledGaussian,
FixedGaussian {
phi: PositiveLikelihoodScale,
},
Unit,
Gamma {
scale: ResolvedGammaScale,
estimated: bool,
},
Tweedie {
phi: PositiveLikelihoodScale,
estimated: bool,
},
BetaPrecision {
precision: PositiveLikelihoodScale,
estimated: bool,
},
NegativeBinomial {
theta: PositiveLikelihoodScale,
estimated: bool,
},
Unspecified,
}Expand description
Validated, family-aware likelihood-scale ownership.
Unlike LikelihoodScaleMetadata alone, this enum is constructed jointly
with ResponseFamily. A value therefore proves both scalar validity and
family/metadata agreement; downstream kernels never need to invent a unit
fallback for a missing or mismatched scale.
Variants§
Implementations§
Source§impl ResolvedLikelihoodScale
impl ResolvedLikelihoodScale
Sourcepub fn gamma_log_shape(self) -> Result<f64, InvalidLikelihoodScale>
pub fn gamma_log_shape(self) -> Result<f64, InvalidLikelihoodScale>
log(shape) for Gamma without reciprocal materialization.
Sourcepub fn gamma_shape(self) -> Result<f64, InvalidLikelihoodScale>
pub fn gamma_shape(self) -> Result<f64, InvalidLikelihoodScale>
Representable Gamma shape. A subnormal fixed dispersion can have a
finite log-shape but a reciprocal beyond f64; that is rejected here,
at the raw-shape consumer, rather than earlier in log-density code.
pub fn gamma_phi(self) -> Result<f64, InvalidLikelihoodScale>
pub fn tweedie_log_phi(self) -> Result<f64, InvalidLikelihoodScale>
pub fn tweedie_phi(self) -> Result<f64, InvalidLikelihoodScale>
pub fn negative_binomial_log_theta(self) -> Result<f64, InvalidLikelihoodScale>
pub fn negative_binomial_theta(self) -> Result<f64, InvalidLikelihoodScale>
pub fn beta_log_precision(self) -> Result<f64, InvalidLikelihoodScale>
pub fn beta_precision(self) -> Result<f64, InvalidLikelihoodScale>
pub fn gaussian_log_phi(self) -> Result<f64, InvalidLikelihoodScale>
pub fn gaussian_phi(self) -> Result<f64, InvalidLikelihoodScale>
Trait Implementations§
Source§impl Clone for ResolvedLikelihoodScale
impl Clone for ResolvedLikelihoodScale
Source§fn clone(&self) -> ResolvedLikelihoodScale
fn clone(&self) -> ResolvedLikelihoodScale
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResolvedLikelihoodScale
Source§impl Debug for ResolvedLikelihoodScale
impl Debug for ResolvedLikelihoodScale
Source§impl PartialEq for ResolvedLikelihoodScale
impl PartialEq for ResolvedLikelihoodScale
impl StructuralPartialEq for ResolvedLikelihoodScale
Auto Trait Implementations§
impl Freeze for ResolvedLikelihoodScale
impl RefUnwindSafe for ResolvedLikelihoodScale
impl Send for ResolvedLikelihoodScale
impl Sync for ResolvedLikelihoodScale
impl Unpin for ResolvedLikelihoodScale
impl UnsafeUnpin for ResolvedLikelihoodScale
impl UnwindSafe for ResolvedLikelihoodScale
Blanket Implementations§
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
Mutably borrows from an owned value. Read more