Namespaces

Types

Type Dirichlet

Namespace MathNet.Numerics.Distributions

Implements the multivariate Dirichlet distribution. For details about this distribution, see.

The distribution will use the Random by default. Users can get/set the random number generator by using the RandomSource property.

The statistics classes will check all the incoming parameters whether they are in the allowed range. This might involve heavy computation. Optionally, by setting Control.CheckDistributionParameters to false, all parameter checks can be turned off.

Methods

Properties

Public static methods

bool IsValidParameterSet(Double[] alpha)

Checks whether the parameters of the distribution are valid: no parameter can be less than zero and at least one parameter should be larger than zero.
Parameters
return bool True when the parameters are valid, false otherwise.
Double[] alpha The parameters of the Dirichlet distribution.

Double[] Sample(Random rnd, Double[] alpha)

Samples a Dirichlet distributed random vector.
Parameters
return Double[]
Random rnd The random number generator to use.
Double[] alpha The Dirichlet distribution parameter.

Public properties

Double[] Alpha get; set;

Gets or sets the parameters of the Dirichlet distribution.
return Double[]

int Dimension get;

Gets the dimension of the Dirichlet distribution.
return int

Double[] Mean get;

Gets the mean of the Dirichlet distribution.
return Double[]

Random RandomSource get; set;

Gets or sets the random number generator which is used to draw random samples.
return Random

Double[] Variance get;

Gets the variance of the Dirichlet distribution.
return Double[]