All Packages Class Hierarchy This Package Previous Next Index WEKA's home
java.lang.Object
|
+----java.util.Random
|
+----weka.core.RandomVariates
Variates related to standard Exponential can be generated using simple transformations.
If a>1, it uses a rejection method developed by Minh(1988)"Generating Gamma Variates", ACM Trans.
public RandomVariates()
public RandomVariates(long seed)
seed - the seed in this random object
public double nextExponential()
Variates related to standard Exponential can be generated using simple transformations.
public double nextErlang(int a) throws java.lang.Exception
nextGamma(double a)
instead.a - the shape parameter, must be no less than 1
public double nextGamma(double a) throws java.lang.Exception
If a>1, it uses a rejection method developed by Minh(1988)"Generating
Gamma Variates", ACM Trans. on Math. Software, Vol.14, No.3, pp261-266.
If a<1, it uses the algorithm "GS" developed by Ahrens and Dieter(1974)
"COMPUTER METHODS FOR SAMPLING FROM GAMMA, BETA, POISSON AND BINOMIAL
DISTRIBUTIONS", COMPUTING, 12 (1974), pp223-246, and further implemented
in Fortran by Ahrens, Kohrt and Dieter(1983) "Algorithm 599: sampling
from Gamma and Poisson distributions", ACM Trans. on Math. Software,
Vol.9 No.2, pp255-257.
Variates related to standard Gamma can be generated using simple transformations.
a - the shape parameter, must be greater than 1
public static void main(java.lang.String ops[])
ops - # of variates/seed, default is 10/45
All Packages Class Hierarchy This Package Previous Next Index WEKA's home