org.encog.mathutil.randomize
Class XaiverRandomizer
- java.lang.Object
-
- org.encog.mathutil.randomize.XaiverRandomizer
-
- All Implemented Interfaces:
- Randomizer
public class XaiverRandomizer extends java.lang.Object implements Randomizer
-
-
Constructor Summary
Constructors Constructor and Description XaiverRandomizer()XaiverRandomizer(long seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description GenerateRandomgetRandom()voidrandomize(BasicNetwork network, int fromLayer)Randomize one level of a neural network.doublerandomize(double d)Generate a random number.voidrandomize(double[] d)Randomize the array based on an array, modify the array.voidrandomize(double[][] d)Randomize the 2d array based on an array, modify the array.voidrandomize(double[] d, int begin, int size)Randomize an array.voidrandomize(Matrix m)Randomize the matrix based on an array, modify the array.voidrandomize(MLMethod method)Randomize the synapses and biases in the basic network based on an array, modify the array.voidsetRandom(GenerateRandom theRandom)Explicitly set the Random source
-
-
-
Constructor Detail
-
XaiverRandomizer
public XaiverRandomizer()
-
XaiverRandomizer
public XaiverRandomizer(long seed)
-
-
Method Detail
-
randomize
public double randomize(double d)
Generate a random number.- Specified by:
randomizein interfaceRandomizer- Parameters:
d- The input value, not used.- Returns:
- The random number.
-
randomize
public void randomize(BasicNetwork network, int fromLayer)
Randomize one level of a neural network.- Parameters:
network- The network to randomizefromLayer- The from level to randomize.
-
randomize
public void randomize(MLMethod method)
Randomize the synapses and biases in the basic network based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.- Specified by:
randomizein interfaceRandomizer- Parameters:
method- A network to randomize.
-
randomize
public void randomize(double[] d)
Description copied from interface:RandomizerRandomize the array based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.- Specified by:
randomizein interfaceRandomizer- Parameters:
d- An array to randomize.
-
randomize
public void randomize(double[][] d)
Description copied from interface:RandomizerRandomize the 2d array based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.- Specified by:
randomizein interfaceRandomizer- Parameters:
d- An array to randomize.
-
randomize
public void randomize(Matrix m)
Description copied from interface:RandomizerRandomize the matrix based on an array, modify the array. Previous values may be used, or they may be discarded, depending on the randomizer.- Specified by:
randomizein interfaceRandomizer- Parameters:
m- A matrix to randomize.
-
randomize
public void randomize(double[] d, int begin, int size)Description copied from interface:RandomizerRandomize an array.- Specified by:
randomizein interfaceRandomizer- Parameters:
d- The array to randomize.begin- The beginning element.size- The size of the array.
-
setRandom
public void setRandom(GenerateRandom theRandom)
Description copied from interface:RandomizerExplicitly set the Random source- Specified by:
setRandomin interfaceRandomizer- Parameters:
theRandom- Random number generator.
-
getRandom
public GenerateRandom getRandom()
- Specified by:
getRandomin interfaceRandomizer- Returns:
- Retrieve the Random generator.
-
-
DMelt 3.0 © DataMelt by jWork.ORG