public class DirichletMRGParams extends DiMRGParams
DiMRGParams,
FastDirichletMRGParams| Constructor and Description |
|---|
DirichletMRGParams(double... alpha)
Constructor which creates a new hyperparameter vector for a Dirichlet
random generator.
|
DirichletMRGParams(double alpha,
int n)
Constructor which creates a new hyperparameter vector for a Dirichlet
random generator.
|
DirichletMRGParams(int start,
int end,
double... alpha)
Constructor which creates a new hyperparameter vector for a Dirichlet
random generator.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDimension()
Returns the dimension of the hyperparameter vector of the underlying
Dirichlet distribution and therefore the dimension of the generated
random array.
|
double |
getHyperparameter(int i)
Returns the value at position
i of the hyperparameter vector
of the underlying Dirichlet distribution. |
double |
getSumOfHyperparameter()
Returns the sum of the hyperparameters (entries of the hyperparameter
vector) of the underlying Dirichlet distribution.
|
public DirichletMRGParams(double alpha,
int n)
throws IllegalArgumentException
alpha - the value for the hyperparameter vectorn - the dimension of the hyperparameter vectorIllegalArgumentException - if n is chosen incorrectly (has to be greater
than 2) or if alpha is chosen incorrectly (has
to be positive)FastDirichletMRGParams.FastDirichletMRGParams(double)public DirichletMRGParams(double... alpha)
throws IllegalArgumentException
alpha - the hyperparameter vectorIllegalArgumentException - if at least one of the hyperparameters is not positivepublic DirichletMRGParams(int start,
int end,
double... alpha)
throws IllegalArgumentException
start - start index (inclusive)end - end index (exclusive)alpha - the hyperparameter vectorIllegalArgumentException - if at least one of the hyperparameters is not positivepublic int getDimension()
DiMRGParamsgetDimension in class DiMRGParamspublic double getHyperparameter(int i)
DiMRGParamsi of the hyperparameter vector
of the underlying Dirichlet distribution.getHyperparameter in class DiMRGParamsi - the position of the hyperparameter vectori of the hyperparameter vector
of the underlying Dirichlet distributionpublic double getSumOfHyperparameter()