Trait rusty_machine::stats::dist::Distribution
[−]
[src]
pub trait Distribution<T> { fn pdf(&self, x: T) -> f64; fn cdf(&self, x: T) -> f64; fn logpdf(&self, x: T) -> f64 { ... } }
Trait for statistical distributions.
Required Methods
fn pdf(&self, x: T) -> f64
The pdf of the distribution.
fn cdf(&self, x: T) -> f64
The cdf of the distribution.
Provided Methods
fn logpdf(&self, x: T) -> f64
The logpdf of the distribution.
By default this takes the logarithm of the pdf. More efficient functions should be implemented.
Implementors
impl Distribution<f64> for Exponential
impl Distribution<f64> for Gaussian