Skip to main content

ResolvedLikelihoodScale

Enum ResolvedLikelihoodScale 

Source
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§

§

ProfiledGaussian

§

FixedGaussian

§

Unit

§

Gamma

Fields

§estimated: bool
§

Tweedie

Fields

§estimated: bool
§

BetaPrecision

Fields

§estimated: bool
§

NegativeBinomial

Fields

§estimated: bool
§

Unspecified

Implementations§

Source§

impl ResolvedLikelihoodScale

Source

pub fn gamma_log_shape(self) -> Result<f64, InvalidLikelihoodScale>

log(shape) for Gamma without reciprocal materialization.

Source

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.

Source

pub fn gamma_phi(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn tweedie_log_phi(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn tweedie_phi(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn negative_binomial_log_theta(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn negative_binomial_theta(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn beta_log_precision(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn beta_precision(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn gaussian_log_phi(self) -> Result<f64, InvalidLikelihoodScale>

Source

pub fn gaussian_phi(self) -> Result<f64, InvalidLikelihoodScale>

Trait Implementations§

Source§

impl Clone for ResolvedLikelihoodScale

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Copy for ResolvedLikelihoodScale

Source§

impl Debug for ResolvedLikelihoodScale

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ResolvedLikelihoodScale

Source§

fn eq(&self, other: &ResolvedLikelihoodScale) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ResolvedLikelihoodScale

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.