Struct rv::dist::NormalGamma [−][src]
Prior for Gaussian
Given x ~ N(μ, σ)
, the Normal Gamma prior implies that μ ~ N(m, 1/(rρ))
and ρ ~ Gamma(ν/2, s/2)
.
Fields
m: f64
r: f64
s: f64
v: f64
Methods
impl NormalGamma
[src]
impl NormalGamma
Trait Implementations
impl Debug for NormalGamma
[src]
impl Debug for NormalGamma
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for NormalGamma
[src]
impl Clone for NormalGamma
fn clone(&self) -> NormalGamma
[src]
fn clone(&self) -> NormalGamma
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Rv<Gaussian> for NormalGamma
[src]
impl Rv<Gaussian> for NormalGamma
fn ln_f(&self, x: &Gaussian) -> f64
[src]
fn ln_f(&self, x: &Gaussian) -> f64
Un-normalized probability function Read more
fn ln_normalizer(&self) -> f64
[src]
fn ln_normalizer(&self) -> f64
The log of the constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
fn draw<R: Rng>(&self, rng: &mut R) -> Gaussian
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> Gaussian
Single draw from the Rv
Read more
fn f(&self, x: &X) -> f64
[src]
fn f(&self, x: &X) -> f64
Un-normalized probability function Read more
fn normalizer(&self) -> f64
[src]
fn normalizer(&self) -> f64
The constant term in the PDF/PMF. Should not be a function of any of the parameters. Read more
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<X>
[src]
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<X>
Multiple draws of the Rv
Read more
impl Support<Gaussian> for NormalGamma
[src]
impl Support<Gaussian> for NormalGamma
fn contains(&self, x: &Gaussian) -> bool
[src]
fn contains(&self, x: &Gaussian) -> bool
Returns true
if x
is in the support of the Rv
Read more
impl HasSuffStat<f64> for NormalGamma
[src]
impl HasSuffStat<f64> for NormalGamma
type Stat = GaussianSuffStat
fn empty_suffstat(&self) -> Self::Stat
[src]
fn empty_suffstat(&self) -> Self::Stat
impl ContinuousDistr<Gaussian> for NormalGamma
[src]
impl ContinuousDistr<Gaussian> for NormalGamma
fn pdf(&self, x: &X) -> f64
[src]
fn pdf(&self, x: &X) -> f64
The value of the Probability Density Function (PDF) at x
Read more
fn ln_pdf(&self, x: &X) -> f64
[src]
fn ln_pdf(&self, x: &X) -> f64
The value of the log Probability Density Function (PDF) at x
Read more
impl ConjugatePrior<f64, Gaussian> for NormalGamma
[src]
impl ConjugatePrior<f64, Gaussian> for NormalGamma
type Posterior = Self
fn posterior(&self, x: &DataOrSuffStat<f64, Gaussian>) -> Self
[src]
fn posterior(&self, x: &DataOrSuffStat<f64, Gaussian>) -> Self
Computes the posterior distribution from the data
fn ln_m(&self, x: &DataOrSuffStat<f64, Gaussian>) -> f64
[src]
fn ln_m(&self, x: &DataOrSuffStat<f64, Gaussian>) -> f64
Log marginal likelihood
fn ln_pp(&self, y: &f64, x: &DataOrSuffStat<f64, Gaussian>) -> f64
[src]
fn ln_pp(&self, y: &f64, x: &DataOrSuffStat<f64, Gaussian>) -> f64
Log posterior predictive of y given x
fn m(&self, x: &DataOrSuffStat<X, Fx>) -> f64
[src]
fn m(&self, x: &DataOrSuffStat<X, Fx>) -> f64
Marginal likelihood of x
fn pp(&self, y: &X, x: &DataOrSuffStat<X, Fx>) -> f64
[src]
fn pp(&self, y: &X, x: &DataOrSuffStat<X, Fx>) -> f64
Posterior Predictive distribution
Auto Trait Implementations
impl Send for NormalGamma
impl Send for NormalGamma
impl Sync for NormalGamma
impl Sync for NormalGamma