DirichletDistribution Constructor

Definition

Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0

Overload List

DirichletDistribution(Matrix<Double>) Estimates Dirichlet shape parameters from observations using matching moments.
DirichletDistribution(Vector<Double>) Constructs a new DirichletDistribution with the specified parameters.
DirichletDistribution(Vector<Double>[]) Estimates Dirichlet shape parameters from variables using matching moments.

DirichletDistribution(Matrix<Double>)

Estimates Dirichlet shape parameters from observations using matching moments.
C#
public DirichletDistribution(
	Matrix<double> data
)

Parameters

data  Matrix<Double>
A real Matrix<T> whose rows contain the observations.

Return Value

The DirichletDistribution that best matches the distribution of the rows of data.

Remarks

Use this constructor to create a DirichletDistribution whose parameters are estimated from data. Fitting uses the sample means and the trace of the unbiased sample covariance. Parameter estimates themselves are not generally unbiased. At least two observations and two variables are required. Each row must lie strictly inside the simplex and sum to one within the simplex tolerance.

Exceptions

ArgumentNullException

data is null.

ArgumentExceptionThe data has invalid dimensions or simplex values, or cannot yield a finite positive concentration estimate.

DirichletDistribution(Vector<Double>)

Constructs a new DirichletDistribution with the specified parameters.
C#
public DirichletDistribution(
	Vector<double> parameters
)

Parameters

parameters  Vector<Double>
The nonempty vector of positive finite shape parameters, whose sum must also be finite. Its values are copied.

Exceptions

ArgumentNullExceptionparameters is null.
ArgumentOutOfRangeExceptionparameters is empty, contains a nonpositive or nonfinite value, or has a nonfinite sum.

DirichletDistribution(Vector<Double>[])

Estimates Dirichlet shape parameters from variables using matching moments.
C#
public DirichletDistribution(
	Vector<double>[] variables
)

Parameters

variables  Vector<Double>[]
An array of vectors.

Return Value

The DirichletDistribution that best matches the distribution of variables.

Remarks

Use this constructor to create a DirichletDistribution whose parameters are estimated from variables. Each vector is one variable and must have the same observation count. The fitting method and validity rules match DirichletDistribution(Matrix<Double>).

Exceptions

ArgumentNullException

variables is null.

ArgumentExceptionVariables contain null elements, have invalid observation counts or simplex values, or cannot yield a finite positive concentration estimate.

See Also