KJB
|
This class implements a mixture distribution. In other words, it is the sum of a finite number of fractions of distributions of the same type (with different parameters). More...
#include <prob_distribution.h>
Public Member Functions | |
Mixture_distribution (const std::vector< Distribution > &distributions, const std::vector< double > &coefficients) | |
Constructs a mixture distribution from the given distributions and mixing coefficients. More... | |
Mixture_distribution (const std::vector< Distribution > &distributions) | |
Constructs a mixture distribution with equal mixing coefficients. More... | |
Mixture_distribution (const Distribution &dist1, const Distribution &dist2, double pi1) | |
Constructs two-element mixture distribution. More... | |
Friends | |
template<class Dist > | |
double | pdf (const kjb::Mixture_distribution< Dist > &dist, const typename Distribution_traits< Mixture_distribution< Dist > >::type &x) |
template<class Dist > | |
double | cdf (const kjb::Mixture_distribution< Dist > &dist, const typename Distribution_traits< Mixture_distribution< Dist > >::type &x) |
template<class Dist > | |
Distribution_traits < Mixture_distribution< Dist > >::type | sample (const kjb::Mixture_distribution< Dist > &dist) |
This class implements a mixture distribution. In other words, it is the sum of a finite number of fractions of distributions of the same type (with different parameters).
Distribution | The type of distribution that makes up the different parts of the mixture |
|
inline |
Constructs a mixture distribution from the given distributions and mixing coefficients.
This constructore creates a mixture distribution with the given distributions and the given coefficients, where distributions[i] has mixing coefficient coefficients[i].
|
inline |
Constructs a mixture distribution with equal mixing coefficients.
This constructore creates a mixture distribution with the given distributions and equal mixing coefficients. That is, distributions[i] has mixing coefficient 1 / distributions.size(), for all i.
|
inline |
Constructs two-element mixture distribution.
This constructore creates a mixture distribution with two elements, with the coefficient of the first one being pi1, and the coefficient of the second one being 1 - pi1.
|
friend |
|
friend |
|
friend |