|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.utils.random.MRGParams
de.jstacs.utils.random.DiMRGParams
de.jstacs.utils.random.DirichletMRGParams
public class DirichletMRGParams
The container for parameters of a Dirichlet random generator.
DiMRGParams
,
FastDirichletMRGParams
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirichletMRGParams(double alpha, int n) throws IllegalArgumentException
alpha
- the value for the hyperparameter vectorn
- the dimension of the hyperparameter vector
IllegalArgumentException
- 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 vector
IllegalArgumentException
- 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 vector
IllegalArgumentException
- if at least one of the hyperparameters is not positiveMethod Detail |
---|
public int getDimension()
DiMRGParams
getDimension
in class DiMRGParams
public double getHyperparameter(int i)
DiMRGParams
i
of the hyperparameter vector
of the underlying Dirichlet distribution.
getHyperparameter
in class DiMRGParams
i
- the position of the hyperparameter vector
i
of the hyperparameter vector
of the underlying Dirichlet distributionpublic double getSumOfHyperparameter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |