Next: , Previous: , Up: Common   [Contents]


3.6 Discrete distributions

Bio++ contains several probability distributions (currently only dicrete or discretized ones). These are:

3.6.1 Standard Distributions

Constant(value={float})

a Dirac distribution on value, with parameter value.

Beta(n={int>=2}, alpha={float>0}, beta={float>0})

a discretized beta distribution, with n classes, with standard parameters alpha and beta.

Gamma(n={int>=2}, alpha={float>0}, beta={float>0})

a discretized gamma distribution, with n classes, a shape alpha and a rate beta, with parameters alpha and beta.

Gaussian(n={int>=1}, mu={float}, sigma={float>0})

a discretized gaussian distribution, with n classes, a mean mu and a standard deviation sigma, with parameters mu and sigma.

Exponential(n={int>=2}, lambda={float>0})

a discretized exponential distribution, with n classes and parameter lambda.

Simple(values={vector<double>}, probas={vector<double>} [, ranges={vector<parametername[min;max]>}])

a discrete distribution with specific values (in values) and their respective non-negative probabibilities (in probas). The parameters are V1, V2, ..., Vn for all the values and the relative probabibility parameters are theta1, theta2, ..., thetan-1. Optional argument {ranges} sets the allowed ranges of values taken by the parameters; usage is like ‘ranges=(V1[0.2;0.9],V2[1.1;999])’.

TruncExponential(n={int>=2}, lambda={float>0}, tp={float>0})

a discretized truncated exponential distribution, with n classes, parameter lambda and a truncation point tp. The parameters are lambda and tp.

Uniform(n={int>=1}, begin={float>0}, end={float>0})

a uniform distribution, with n classes in interval [begin,end]. There are no parameters.

3.6.2 Mixture Distributions

Invariant(dist={distribution description}, p={float>0})

a Mixture of a given discrete distributution and a 0 Dirac. p is the probability of this 0 Dirac.

For example :

Invariant(dist=Gaussian(n=4,2,0.5),p=0.1)

builds a mixture of a gaussian distribution with 4 categories (and probability 0.9) and a 0 Dirac with probability 0.1. Overall, there are 5 categories. The parameters names are Invariant.Gaussian.mu, Invariant.Gaussian.sigma, Invariant.p.

Mixture(probas={vector<double>}, dist1={distribution description}, ..., distn={distribution description})

a Mixture of discrete distributions with specific probabilities (in probas) and their respective desccriptions (in probas). The parameters are the relative probabibility parameters theta1, theta2, ..., thetan-1, and the parameters of the included distributions prefixed by Mixture.i_ where i is the order of the distribution.

For example:

Mixture(probas=(0.3,0.7),dist1=Beta(n=5,alpha=2,beta=3),\
                       dist2=Gamma(n=10,alpha=9,beta=2)) 

builds a mixture of a discrete beta distribution and of a discrete gamma distribution, with a total of 15 classes. The parameters names are Mixture.theta1, Mixture.1_Beta.alpha, Mixture.1_Beta.beta, Mixture.2_Gamma.alpha and Mixture.2_Gamma.beta.


Next: , Previous: , Up: Common   [Contents]