public class Sampling extends Object
Constructor and Description |
---|
Sampling() |
Modifier and Type | Method and Description |
---|---|
static INDArray |
binomial(INDArray p,
int n,
org.apache.commons.math3.random.RandomGenerator rng)
Generate a binomial distribution based on the given rng,
a matrix of p values, and a max number.
|
static INDArray |
normal(org.apache.commons.math3.random.RandomGenerator rng,
INDArray mean,
double sigma)
A uniform sample ranging from 0 to sigma.
|
static INDArray |
normal(org.apache.commons.math3.random.RandomGenerator rng,
INDArray mean,
INDArray sigma)
A uniform sample ranging from 0 to sigma.
|
public static INDArray normal(org.apache.commons.math3.random.RandomGenerator rng, INDArray mean, INDArray sigma)
rng
- the rng to usemean,
- the matrix mean from which to generate values fromsigma
- the standard deviation to use to generate the gaussian noisepublic static INDArray normal(org.apache.commons.math3.random.RandomGenerator rng, INDArray mean, double sigma)
rng
- the rng to usemean,
- the matrix mean from which to generate values fromsigma
- the standard deviation to use to generate the gaussian noisepublic static INDArray binomial(INDArray p, int n, org.apache.commons.math3.random.RandomGenerator rng)
p
- the p matrix to usen
- the n to userng
- the rng to useCopyright © 2014. All Rights Reserved.