[−][src]Struct rstat::Mixture
Fields
dist: Categorical
components: Vec<C>
Methods
impl<C: Distribution> Mixture<C> where
C::Support: Enclose,
[src]
C::Support: Enclose,
pub fn new<T: Into<Categorical>>(prior: T, components: Vec<C>) -> Mixture<C>
[src]
pub fn homogeneous(components: Vec<C>) -> Mixture<C>
[src]
impl<C: Distribution> Mixture<C>
[src]
pub fn n_components(&self) -> usize
[src]
Trait Implementations
impl<C: Distribution> Distribution for Mixture<C> where
C::Support: Clone,
[src]
C::Support: Clone,
type Support = C::Support
fn support(&self) -> Self::Support
[src]
fn cdf(&self, x: <Self::Support as Space>::Value) -> Probability
[src]
fn sample<R: Rng + ?Sized>(
&self,
rng: &mut R
) -> <Self::Support as Space>::Value
[src]
&self,
rng: &mut R
) -> <Self::Support as Space>::Value
fn ccdf(&self, x: <Self::Support as Space>::Value) -> Probability
[src]
Evaluates the complementary cumulative distribution function at x
. Read more
fn logcdf(&self, x: <Self::Support as Space>::Value) -> f64
[src]
Evaluates the log CDF at x
: ln F(x)
.
fn logccdf(&self, x: <Self::Support as Space>::Value) -> f64
[src]
Evaluates the log complementary CDF at x
: ln (1 - F(x))
.
fn cdf_batch(
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
Evaluates the CDF element-wise for a batch xs
.
fn ccdf_batch(
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
[src]
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<Probability>
Evaluates the complementary CDF element-wise for a batch xs
.
fn logcdf_batch(
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
Evaluates the log CDF element-wise for a batch xs
.
fn logccdf_batch(
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
Evaluates the log complementary CDF element-wise for a batch xs
.
fn sample_n<D, Sh, R: ?Sized>(
&self,
rng: &mut R,
shape: Sh
) -> Array<<Self::Support as Space>::Value, D> where
D: Dimension,
Sh: ShapeBuilder<Dim = D>,
R: Rng,
[src]
&self,
rng: &mut R,
shape: Sh
) -> Array<<Self::Support as Space>::Value, D> where
D: Dimension,
Sh: ShapeBuilder<Dim = D>,
R: Rng,
ⓘImportant traits for Sampler<D, R>fn sample_iter<R>(self, rng: R) -> Sampler<Self, R> where
Self: Sized,
R: Rng,
[src]
Self: Sized,
R: Rng,
impl<C: ContinuousDistribution> ContinuousDistribution for Mixture<C> where
C::Support: Clone,
<C::Support as Space>::Value: Clone,
[src]
C::Support: Clone,
<C::Support as Space>::Value: Clone,
fn pdf(&self, x: <Self::Support as Space>::Value) -> f64
[src]
fn logpdf(&self, x: <Self::Support as Space>::Value) -> f64
[src]
Evaluates the log PDF at x
.
fn pdf_batch(&self, xs: Vector<<Self::Support as Space>::Value>) -> Vector<f64>
[src]
Evaluates the PDF element-wise for a batch xs
.
fn logpdf_batch(
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
[src]
&self,
xs: Vector<<Self::Support as Space>::Value>
) -> Vector<f64>
Evaluates the log PDF element-wise for a batch xs
.
fn loglikelihood(&self, xs: Vector<<Self::Support as Space>::Value>) -> f64
[src]
impl<C: UnivariateMoments> UnivariateMoments for Mixture<C> where
C::Support: Clone,
[src]
C::Support: Clone,
fn mean(&self) -> f64
[src]
fn variance(&self) -> f64
[src]
fn skewness(&self) -> f64
[src]
fn kurtosis(&self) -> f64
[src]
fn standard_deviation(&self) -> f64
[src]
Computes the standard deviation of the distribution.
fn excess_kurtosis(&self) -> f64
[src]
Computes the excess kurtosis of the distribution.
impl<C: Clone + Distribution> Clone for Mixture<C> where
C::Support: Clone,
[src]
C::Support: Clone,
fn clone(&self) -> Mixture<C>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<C: Debug + Distribution> Debug for Mixture<C> where
C::Support: Debug,
[src]
C::Support: Debug,
Auto Trait Implementations
impl<C> Send for Mixture<C> where
C: Send,
<C as Distribution>::Support: Send,
C: Send,
<C as Distribution>::Support: Send,
impl<C> Sync for Mixture<C> where
C: Sync,
<C as Distribution>::Support: Sync,
C: Sync,
<C as Distribution>::Support: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,