[][src]Struct rv::dist::NormalGamma

pub struct NormalGamma { /* fields omitted */ }

Prior for Gaussian

Given x ~ N(μ, σ), the Normal Gamma prior implies that μ ~ N(m, 1/(rρ)) and ρ ~ Gamma(ν/2, s/2).

Methods

impl NormalGamma[src]

pub fn set_m(&mut self, val: f64) -> &mut Self[src]

pub fn set_r(&mut self, val: f64) -> &mut Self[src]

pub fn set_s(&mut self, val: f64) -> &mut Self[src]

pub fn set_v(&mut self, val: f64) -> &mut Self[src]

impl NormalGamma[src]

pub fn new(m: f64, r: f64, s: f64, v: f64) -> Result<Self, NormalGammaError>[src]

Create a new Normal Gamma distribution

Arguments

  • m: The prior mean
  • r: Relative precision of μ versus data
  • s: The mean of rho (the precision) is v/s.
  • v: Degrees of freedom of precision of rho

pub fn new_unchecked(m: f64, r: f64, s: f64, v: f64) -> Self[src]

Creates a new NormalGamma without checking whether the parameters are valid.

pub fn m(&self) -> f64[src]

Get the m parameter

pub fn r(&self) -> f64[src]

Get the r parameter

pub fn s(&self) -> f64[src]

Get the s parameter

pub fn v(&self) -> f64[src]

Get the v parameter

Trait Implementations

impl Clone for NormalGamma[src]

impl ConjugatePrior<f64, Gaussian> for NormalGamma[src]

type Posterior = Self

impl ContinuousDistr<Gaussian> for NormalGamma[src]

impl Debug for NormalGamma[src]

impl Display for NormalGamma[src]

impl<'_> From<&'_ NormalGamma> for String[src]

impl HasSuffStat<f64> for NormalGamma[src]

impl PartialEq<NormalGamma> for NormalGamma[src]

impl PartialOrd<NormalGamma> for NormalGamma[src]

impl Rv<Gaussian> for NormalGamma[src]

impl StructuralPartialEq for NormalGamma[src]

impl Support<Gaussian> for NormalGamma[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Fx, X> ContinuousDistr<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: ContinuousDistr<X>, 
[src]

impl<T> From<T> for T[src]

impl<Fx, X> HasSuffStat<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: HasSuffStat<X>, 
[src]

type Stat = <<Fx as Deref>::Target as HasSuffStat<X>>::Stat

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<Fx, X> Rv<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Rv<X>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<Fx, X> Support<X> for Fx where
    Fx: Deref,
    <Fx as Deref>::Target: Support<X>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,