Modifier and Type | Method and Description |
---|---|
static DenseMatrix |
MatrixFactory.randomDenseMatrix(int nRows,
int nCols,
RandomNumberGenerator rng)
Constructs a random DenseMatrix.
|
static LowerTriangularMatrix |
MatrixFactory.randomLowerTriangularMatrix(int dim,
RandomNumberGenerator rng)
Constructs a random LowerTriangularMatrix.
|
static Matrix |
MatrixFactory.randomPositiveDefiniteMatrix(int dim,
RandomNumberGenerator rng)
Constructs a random symmetric, positive definite matrix.
|
static SymmetricMatrix |
MatrixFactory.randomSymmetricMatrix(int dim,
RandomNumberGenerator rng)
Constructs a random SymmetricMatrix.
|
static UpperTriangularMatrix |
MatrixFactory.randomUpperTriangularMatrix(int dim,
RandomNumberGenerator rng)
Constructs a random UpperTriangularMatrix.
|
Modifier and Type | Class and Description |
---|---|
class |
InverseTransformSamplingEVDRNG
Generate random numbers according to a given univariate extreme value distribution, by
inverse transform sampling.
|
Modifier and Type | Class and Description |
---|---|
class |
ExtremeValueMC
Simulation of first order extreme value Markov chains such that each pair of consecutive values
has the dependence structure of given bivariate extreme value distributions.
|
Constructor and Description |
---|
ExtremeValueMC(BivariateEVD bivariate,
ExtremeValueMC.MarginalDistributionType marginalType,
RandomNumberGenerator uniformRng)
Create an instance with a given bivariate distribution that defines the dependence structure
between two consecutive simulated values, and a uniform random number generator.
|
Modifier and Type | Class and Description |
---|---|
class |
MARMASim
Generate random numbers based on a given MARMA model.
|
Constructor and Description |
---|
MARMASim(MARMAModel model,
RandomNumberGenerator generator)
Create an instance with the given
MARMAModel , but override the innovation generation
by the the given generator. |
MARMASim(MARMAModel model,
RandomNumberGenerator generator,
double[] initials)
Create an instance with the given
MARMAModel and initial values, but override the
innovation generation by the the given generator. |
Modifier and Type | Class and Description |
---|---|
class |
HiddenMarkovModel |
class |
HMMRNG
In a (discrete) hidden Markov model, the state is not directly visible, but
output, dependent on the state, is visible.
|
Constructor and Description |
---|
HiddenMarkovModel(Vector PI,
Matrix A,
RandomNumberGenerator[] B) |
HMMRNG(Vector PI,
Matrix A,
RandomNumberGenerator[] B)
Constructs a hidden Markov model.
|
Modifier and Type | Class and Description |
---|---|
class |
BaumWelch
This implementation trains an HMM model by observations using the Baum–Welch
algorithm.
|
class |
DiscreteHMM
This is the discrete hidden Markov model as defined by Rabiner.
|
Modifier and Type | Class and Description |
---|---|
class |
MixtureHMM
This is the mixture hidden Markov model (HMM).
|
class |
MixtureHMMEM
The EM algorithm is used to find the unknown parameters of a hidden Markov
model (HMM) by making use of the forward-backward algorithm.
|
Modifier and Type | Method and Description |
---|---|
RandomNumberGenerator[] |
ExponentialMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
BetaMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
LogNormalMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
BinomialMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
GammaMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
NormalMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
PoissonMixtureDistribution.newRandomNumberGenerators() |
RandomNumberGenerator[] |
MixtureDistribution.newRandomNumberGenerators()
Get the random number generators corresponding to the distributions
(possibly differently parameterized) for all states.
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleMC
This is a time-homogeneous Markov chain with a finite state space.
|
Modifier and Type | Field and Description |
---|---|
static RandomNumberGenerator |
RNGUtils.SYNC_RNORM |
Modifier and Type | Method and Description |
---|---|
static RandomNumberGenerator |
RNGUtils.synchronizedRNG(RandomNumberGenerator rng)
Returns a synchronized (thread-safe)
RandomNumberGenerator
backed by a specified generator. |
Modifier and Type | Method and Description |
---|---|
static double[] |
RNGUtils.nextN(RandomNumberGenerator rng,
int n)
Generates
n random numbers from a given random number generator. |
static RandomNumberGenerator |
RNGUtils.synchronizedRNG(RandomNumberGenerator rng)
Returns a synchronized (thread-safe)
RandomNumberGenerator
backed by a specified generator. |
Modifier and Type | Class and Description |
---|---|
class |
ConcurrentCachedRLG
This is a fast thread-safe wrapper for random long generators.
|
class |
ConcurrentCachedRNG
This is a fast thread-safe wrapper for random number generators.
|
Constructor and Description |
---|
ConcurrentCachedRNG(RandomNumberGenerator rng)
Construct a new instance which wraps the given random number generator
and
uses a cache which has 8 entries per available core.
|
ConcurrentCachedRNG(RandomNumberGenerator rng,
int cacheSize)
Constructs a new instance which wraps the given random number generator
and uses a cache of the specified size.
|
Modifier and Type | Class and Description |
---|---|
class |
ContextRNG<T>
This uniform number generator generates independent sequences of random numbers per context.
|
class |
ThreadIDRLG
This uniform number generator generates independent sequences of random numbers per thread, hence
thread-safe.
|
class |
ThreadIDRNG
This random number generator generates independent sequences of random numbers per thread, hence
thread-safe.
|
Modifier and Type | Method and Description |
---|---|
protected RandomNumberGenerator |
ContextRNG.getRNG(T context) |
Constructor and Description |
---|
IID(RandomNumberGenerator rng,
int length)
Construct a rvg that outputs vectors that have i.i.d.
|
Constructor and Description |
---|
AbstractHybridMCMC(Vector initialState,
RandomNumberGenerator rng)
Constructs a new instance with the given parameters.
|
Constructor and Description |
---|
AbstractMetropolis(Vector initialState,
RandomNumberGenerator rng)
Constructs a new instance with the given parameters.
|
MetropolisHastings(RealScalarFunction logf,
ProposalFunction proposalFunction,
MetropolisHastings.ProposalDensityFunction proposalDensity,
Vector initialState,
RandomNumberGenerator rng)
Constructs a new instance with the given parameters.
|
Modifier and Type | Interface and Description |
---|---|
interface |
RandomLongGenerator
A (pseudo) random number generator that generates a sequence of
long s that lack any pattern and are uniformly distributed. |
Modifier and Type | Class and Description |
---|---|
class |
BernoulliTrial
A Bernoulli trial (or binomial trial) is a random experiment with exactly two possible outcomes,
"success" and "failure", in which the probability of success, p, is the same every time
the experiment is conducted.
|
class |
BinomialRNG
This random number generator samples from the binomial distribution.
|
class |
BurnInRNG
A burn-in random number generator discards the first M samples.
|
class |
InverseTransformSampling
Inverse transform sampling (also known as inversion sampling, the inverse probability integral
transform, the inverse transformation method, Smirnov transform, golden rule, etc.)
is a basic method for pseudo-random number sampling,
i.e.
|
class |
LogNormalRNG
This random number generator samples from the log-normal distribution.
|
class |
RayleighRNG
This random number generator samples from the Rayleigh distribution using the inverse transform sampling method.
|
class |
ThinRNG
Thinning is a scheme that returns every m-th item, discarding the last m-1 items for each draw.
|
class |
WeibullRNG
This random number generator samples from the Weibull distribution using the inverse transform sampling method.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
BernoulliTrial.nextLogTrial(RandomNumberGenerator rng,
double p)
Performs a Bernoulli trial that succeeds with probability ep.
|
static boolean |
BernoulliTrial.nextTrial(RandomNumberGenerator rng,
double p)
Performs a Bernoulli trial that succeeds with probability p.
|
Constructor and Description |
---|
BernoulliTrial(RandomNumberGenerator rng,
double p)
Creates a new instance that uses the given
RandomNumberGenerator to do the trial. |
BurnInRNG(RandomNumberGenerator rvg,
int burnInSamples)
Construct a burn-in RNG.
|
ThinRNG(RandomNumberGenerator rng,
int m)
Constructs a thinned RNG.
|
Modifier and Type | Interface and Description |
---|---|
interface |
RandomBetaGenerator
This is a random number generator that generates random deviates according to the Beta distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
Cheng1978
Cheng, 1978, is a new rejection method for generating beta variates.
|
class |
VanDerWaerden1969
Deprecated.
Cheng1978 is a much better algorithm. |
Modifier and Type | Interface and Description |
---|---|
interface |
RandomExpGenerator
This is a random number generator that generates random deviates according to the exponential distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
InverseTransformSamplingExpRNG
This is a pseudo random number generator that samples from the exponential distribution using the inverse transform sampling method.
|
class |
Ziggurat2000Exp
This implements the ziggurat algorithm to sample from the exponential distribution.
|
Modifier and Type | Interface and Description |
---|---|
interface |
RandomGammaGenerator
This is a random number generator that generates random deviates according to the Gamma distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
InverseTransformSamplingGammaRNG
Deprecated.
There exist much more efficient algorithms.
|
class |
KunduGupta2007
Kundu-Gupta propose a very convenient way to generate gamma random variables using generalized
exponential distribution,
when the shape parameter lies between 0 and 1.
|
class |
MarsagliaTsang2000
Marsaglia-Tsang is a procedure for generating a gamma variate as the cube of a suitably scaled
normal variate.
|
class |
XiTanLiu2010a
Xi, Tan and Liu proposed two simple algorithms to generate gamma random numbers based on
the ratio-of-uniforms method and logarithmic transformations of gamma random variable.
|
class |
XiTanLiu2010b
Xi, Tan and Liu proposed two simple algorithms to generate gamma random numbers based on
the ratio-of-uniforms method and logarithmic transformations of gamma random variable.
|
Modifier and Type | Interface and Description |
---|---|
interface |
RandomStandardNormalGenerator
This is a random number generator that generates random deviates according to the standard Normal
distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
BoxMuller
The Box-Muller transform (by George Edward Pelham Box and Mervin Edgar Muller 1958)
is a pseudo-random number sampling method for generating pairs of independent standard
normally distributed
(zero expectation, unit variance) random numbers,
given a source of uniformly distributed random numbers.
|
class |
ConcurrentStandardNormalRNG |
class |
MarsagliaBray1964
The polar method (attributed to George Marsaglia, 1964) is a pseudo-random number sampling method
for generating a pair of independent standard normal random variables.
|
class |
NormalRNG
This is a random number generator that generates random deviates according to the Normal
distribution.
|
class |
StandardNormalRNG
An alias for
Zignor2005 to provide a default implementation for sampling from the
standard Normal distribution. |
class |
Ziggurat2000
The Ziggurat algorithm is an algorithm for pseudo-random number sampling from the Normal distribution.
|
class |
Zignor2005
This is an improved version of the Ziggurat algorithm as proposed in the reference.
|
Modifier and Type | Class and Description |
---|---|
class |
InverseTransformSamplingTruncatedNormalRNG
A random variate x defined as
\[
x = \Phi^{-1}( \Phi(\alpha) + U\cdot(\Phi(\beta)-\Phi(\alpha)))\sigma + \mu
\]
with \(\Phi\) the cumulative distribution function and \(\Phi^{-1}\) its inverse, U a
uniform random number on (0, 1), follows the distribution truncated to the range (a,
b).
|
Modifier and Type | Class and Description |
---|---|
class |
Knuth1969
This is a random number generator that generates random deviates according to the Poisson
distribution.
|
Modifier and Type | Class and Description |
---|---|
class |
MWC8222
Marsaglia's MWC256 (also known as MWC8222) is a multiply-with-carry generator.
|
class |
SHR0
SHR0 is a simple uniform random number generator.
|
class |
SHR3
SHR3 is a 3-shift-register generator with period 2^32-1.
|
class |
UniformRNG
A pseudo uniform random number generator samples numbers from the unit interval, [0, 1],
in such a way that there are equal probabilities of them falling in any same length sub-interval.
|
Modifier and Type | Interface and Description |
---|---|
interface |
LinearCongruentialGenerator
A linear congruential generator (LCG) produces a sequence of pseudo-random numbers
based on a linear recurrence relation.
|
Modifier and Type | Class and Description |
---|---|
class |
CompositeLinearCongruentialGenerator
A composite generator combines a number of simple
LinearCongruentialGenerator , such as Lehmer ,
to form one longer period generator by first summing values and then taking modulus. |
class |
LEcuyer
This is the uniform random number generator recommended by L'Ecuyer in 1996.
|
class |
Lehmer
Lehmer proposed a general linear congruential generator that generates pseudo-random numbers in
[0, 1].
|
class |
MRG
A Multiple Recursive Generator (MRG) is a linear congruential generator which takes this form:
|
Modifier and Type | Class and Description |
---|---|
class |
MersenneTwister
Mersenne Twister is one of the best pseudo random number generators
available.
|
Constructor and Description |
---|
AntitheticVariates(UnivariateRealFunction f,
RandomNumberGenerator X1)
Estimate \(E(f(X_1))\) and use AntitheticVariates.INVERSE as the default
antithetic path.
|
AntitheticVariates(UnivariateRealFunction f,
RandomNumberGenerator X1,
UnivariateRealFunction X2)
Estimate \(E(f(X_1))\), where f is a function of a random variable.
|
ControlVariates(UnivariateRealFunction f,
UnivariateRealFunction g,
double Eg,
double b,
RandomNumberGenerator X) |
ImportanceSampling(UnivariateRealFunction h,
UnivariateRealFunction w,
RandomNumberGenerator G) |
Modifier and Type | Class and Description |
---|---|
class |
RandomProcess
This interface represents a univariate random process a.k.a.
|
class |
RandomWalk
This is the Random Walk construction of a stochastic process per SDE
specification.
|
Modifier and Type | Class and Description |
---|---|
class |
OUSim
This class simulates a discrete path of a univariate Ornstein-Uhlenbeck (OU) process.
|
Modifier and Type | Class and Description |
---|---|
class |
ARIMASim
This class simulates an ARIMA (AutoRegressive Integrated Moving Average) process.
|
Constructor and Description |
---|
ARIMASim(ARIMAModel arima,
double[] lags,
double[] innovations,
RandomNumberGenerator rng)
Construct an ARIMA model.
|
ARIMASim(ARIMAModel arima,
RandomNumberGenerator rng)
Construct an ARIMA model.
|
Constructor and Description |
---|
AdditiveModel(double[] trend,
double[] seasonality,
RandomNumberGenerator rng)
Construct a univariate time series by adding up the components.
|
MultiplicativeModel(double[] trend,
double[] seasonality,
RandomNumberGenerator rng)
Construct a univariate time series by multiplying the components.
|
Modifier and Type | Class and Description |
---|---|
class |
GARCHSim
This class simulates the GARCH models of this form.
|
Constructor and Description |
---|
GARCHSim(GARCHModel model,
double[] z,
RandomNumberGenerator rng)
Simulate an GARCH model.
|
GARCHSim(GARCHModel model,
RandomNumberGenerator rng)
Simulate an GARCH model.
|
Modifier and Type | Class and Description |
---|---|
class |
KnightSatchellTran1995
Implements the Knight-Satchell-Tran model of financial asset returns.
|
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.