Dirichlet Distribution Constructor
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| Dirichlet | Estimates Dirichlet shape parameters from observations using matching moments. |
| Dirichlet | Constructs a new DirichletDistribution with the specified parameters. |
| Dirichlet | Estimates Dirichlet shape parameters from variables using matching moments. |
DirichletDistribution(Matrix<Double>)
public DirichletDistribution(
Matrix<double> data
)Parameters
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
| Argument | data is null. |
| Argument | The data has invalid dimensions or simplex values, or cannot yield a finite positive concentration estimate. |
DirichletDistribution(Vector<Double>)
public DirichletDistribution(
Vector<double> parameters
)Parameters
Exceptions
| Argument | parameters is null. |
| Argument | parameters is empty, contains a nonpositive or nonfinite value, or has a nonfinite sum. |
DirichletDistribution(Vector<Double>[])
public DirichletDistribution(
Vector<double>[] variables
)Parameters
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
| Argument | variables is null. |
| Argument | Variables contain null elements, have invalid observation counts or simplex values, or cannot yield a finite positive concentration estimate. |