Struct rv::dist::Beta [−][src]
Beta distribution, Beta(α, β).
Fields
alpha: f64
beta: f64
Methods
impl Beta
[src]
impl Beta
pub fn new(alpha: f64, beta: f64) -> Result<Self>
[src]
pub fn new(alpha: f64, beta: f64) -> Result<Self>
pub fn uniform() -> Self
[src]
pub fn uniform() -> Self
Create a Beta
distribution with even density over (0, 1).
pub fn jeffreys() -> Self
[src]
pub fn jeffreys() -> Self
Create a Beta
distribution with the Jeffrey's parameterization,
Beta(0.5, 0.5).
Trait Implementations
impl Debug for Beta
[src]
impl Debug for Beta
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 Beta
[src]
impl Clone for Beta
fn clone(&self) -> Beta
[src]
fn clone(&self) -> Beta
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 PartialEq for Beta
[src]
impl PartialEq for Beta
fn eq(&self, other: &Beta) -> bool
[src]
fn eq(&self, other: &Beta) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Beta) -> bool
[src]
fn ne(&self, other: &Beta) -> bool
This method tests for !=
.
impl Default for Beta
[src]
impl Default for Beta
impl Variance<f64> for Beta
[src]
impl Variance<f64> for Beta
impl Entropy for Beta
[src]
impl Entropy for Beta
impl Skewness for Beta
[src]
impl Skewness for Beta
impl Kurtosis for Beta
[src]
impl Kurtosis for Beta
impl Rv<f32> for Beta
[src]
impl Rv<f32> for Beta
fn ln_f(&self, x: &f32) -> f64
[src]
fn ln_f(&self, x: &f32) -> f64
Un-normalized probability function Read more
fn draw<R: Rng>(&self, rng: &mut R) -> f32
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> f32
Single draw from the Rv
Read more
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f32>
[src]
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f32>
Multiple draws of the Rv
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 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
impl Support<f32> for Beta
[src]
impl Support<f32> for Beta
impl ContinuousDistr<f32> for Beta
[src]
impl ContinuousDistr<f32> for Beta
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 Mean<f32> for Beta
[src]
impl Mean<f32> for Beta
impl Mode<f32> for Beta
[src]
impl Mode<f32> for Beta
impl Rv<f64> for Beta
[src]
impl Rv<f64> for Beta
fn ln_f(&self, x: &f64) -> f64
[src]
fn ln_f(&self, x: &f64) -> f64
Un-normalized probability function Read more
fn draw<R: Rng>(&self, rng: &mut R) -> f64
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> f64
Single draw from the Rv
Read more
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f64>
[src]
fn sample<R: Rng>(&self, n: usize, rng: &mut R) -> Vec<f64>
Multiple draws of the Rv
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 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
impl Support<f64> for Beta
[src]
impl Support<f64> for Beta
impl ContinuousDistr<f64> for Beta
[src]
impl ContinuousDistr<f64> for Beta
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 Mean<f64> for Beta
[src]
impl Mean<f64> for Beta
impl Mode<f64> for Beta
[src]
impl Mode<f64> for Beta
impl Rv<Bernoulli> for Beta
[src]
impl Rv<Bernoulli> for Beta
fn ln_f(&self, x: &Bernoulli) -> f64
[src]
fn ln_f(&self, x: &Bernoulli) -> 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) -> Bernoulli
[src]
fn draw<R: Rng>(&self, rng: &mut R) -> Bernoulli
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<Bernoulli> for Beta
[src]
impl Support<Bernoulli> for Beta
fn contains(&self, x: &Bernoulli) -> bool
[src]
fn contains(&self, x: &Bernoulli) -> bool
Returns true
if x
is in the support of the Rv
Read more
impl ContinuousDistr<Bernoulli> for Beta
[src]
impl ContinuousDistr<Bernoulli> for Beta
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<bool, Bernoulli> for Beta
[src]
impl ConjugatePrior<bool, Bernoulli> for Beta
type Posterior = Self
fn posterior(&self, x: &DataOrSuffStat<bool, Bernoulli>) -> Self
[src]
fn posterior(&self, x: &DataOrSuffStat<bool, Bernoulli>) -> Self
Computes the posterior distribution from the data
fn ln_m(&self, x: &DataOrSuffStat<bool, Bernoulli>) -> f64
[src]
fn ln_m(&self, x: &DataOrSuffStat<bool, Bernoulli>) -> f64
Log marginal likelihood
fn ln_pp(&self, y: &bool, x: &DataOrSuffStat<bool, Bernoulli>) -> f64
[src]
fn ln_pp(&self, y: &bool, x: &DataOrSuffStat<bool, Bernoulli>) -> 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