org.encog.mathutil.randomize
public abstract class BasicRandomizer extends Object implements Randomizer
Constructor and Description |
---|
BasicRandomizer()
Construct a random number generator with a random(current time) seed.
|
Modifier and Type | Method and Description |
---|---|
GenerateRandom |
getRandom() |
double |
nextDouble() |
double |
nextDouble(double min,
double max)
Generate a random number in the specified range.
|
void |
randomize(BasicNetwork network,
int fromLayer)
Randomize one level of a neural network.
|
void |
randomize(double[] d)
Randomize the array based on an array, modify the array.
|
void |
randomize(double[][] d)
Randomize the 2d array based on an array, modify the array.
|
void |
randomize(double[] d,
int begin,
int size)
Randomize the array based on an array, modify the array.
|
void |
randomize(Matrix m)
Randomize the matrix based on an array, modify the array.
|
void |
randomize(MLMethod method)
Randomize the synapses and biases in the basic network based on an array,
modify the array.
|
void |
setRandom(GenerateRandom theRandom)
Explicitly set the Random source
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
randomize
public BasicRandomizer()
public final GenerateRandom getRandom()
getRandom
in interface Randomizer
public final double nextDouble()
public final double nextDouble(double min, double max)
min
- The minimum value.max
- The maximum value.public void randomize(BasicNetwork network, int fromLayer)
network
- The network to randomizefromLayer
- The from level to randomize.public void randomize(double[] d)
randomize
in interface Randomizer
d
- An array to randomize.public void randomize(double[] d, int begin, int size)
randomize
in interface Randomizer
d
- An array to randomize.begin
- The beginning element of the array.size
- The size of the array to copy.public void randomize(double[][] d)
randomize
in interface Randomizer
d
- An array to randomize.public void randomize(Matrix m)
randomize
in interface Randomizer
m
- A matrix to randomize.public void randomize(MLMethod method)
randomize
in interface Randomizer
method
- A network to randomize.public final void setRandom(GenerateRandom theRandom)
Randomizer
setRandom
in interface Randomizer
theRandom
- the random to setCopyright © 2014. All Rights Reserved.