org.joone.engine.weights
Class RandomWeightInitializer
- java.lang.Object
-
- org.joone.engine.weights.RandomWeightInitializer
-
- All Implemented Interfaces:
- java.io.Serializable, WeightInitializer
public class RandomWeightInitializer extends java.lang.Object implements WeightInitializer
This class initializes weights (and biases) in a random way within a given domain.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RandomWeightInitializer(double aBoundary)Creates a new instance of RandomWeightInitializerRandomWeightInitializer(double aLowerBound, double anUpperBound)Creates a new instance of RandomWeightInitializer and set the domain to initialize the weights with to[aLowerBound, anUpperBound].
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetLowerBound()Gets the lower bound.doublegetUpperBound()Gets the upper bound.voidinitialize(Matrix aMatrix)Initializes the weights or biases within the domain[lowerBound, upperBound].voidsetLowerBound(double aLowerBound)Sets the lower bound.voidsetUpperBound(double anUpperBound)Sets the upper bound.
-
-
-
Constructor Detail
-
RandomWeightInitializer
public RandomWeightInitializer(double aBoundary)
Creates a new instance of RandomWeightInitializer- Parameters:
aBoundary- the boundaries of the domain to initialize the weights with to[-aBoundary, aBoundary].
-
RandomWeightInitializer
public RandomWeightInitializer(double aLowerBound, double anUpperBound)Creates a new instance of RandomWeightInitializer and set the domain to initialize the weights with to[aLowerBound, anUpperBound].- Parameters:
aLowerBound- the lower boundary of the domain to initialize the weights with.anUpperBound- the upper boundary of the domain to initialize the weights with. to[-aBoundary, aBoundary].
-
-
Method Detail
-
initialize
public void initialize(Matrix aMatrix)
Initializes the weights or biases within the domain[lowerBound, upperBound].- Specified by:
initializein interfaceWeightInitializer- Parameters:
aMatrix- the weights or biases to initialize.
-
getLowerBound
public double getLowerBound()
Gets the lower bound.- Returns:
- the lower bound.
-
setLowerBound
public void setLowerBound(double aLowerBound)
Sets the lower bound.- Parameters:
aLowerBound- the new lower bound.
-
getUpperBound
public double getUpperBound()
Gets the upper bound.- Returns:
- the upper bound.
-
setUpperBound
public void setUpperBound(double anUpperBound)
Sets the upper bound.- Parameters:
anUpperBound- the new upper bound.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG