public class ThreeLayerNetwork extends AbstractRepresentation
Constructor and Description |
---|
ThreeLayerNetwork(int inputnumber,
int outputnumber,
NESRandom random,
java.util.Hashtable<java.lang.String,XMLFieldEntry> properties) |
Modifier and Type | Method and Description |
---|---|
float |
activate(float x) |
AbstractRepresentation |
cloneFunction()
Creates a full clone of this representation.
|
double |
diffTo(AbstractRepresentation o)
Compares this representation to another one.
|
void |
exportToFile(java.io.File saveFile)
Exports the content of this representation to a file.
|
org.dom4j.Element |
exportToXmlElement(org.dom4j.Element element)
Method used for saving the properties of this component
|
java.util.Hashtable<java.lang.String,java.lang.String> |
getDetails()
Returns a table of key-value pairs that describes this representation.
|
int |
getNumberofMutationFunctions()
Returns the number of implemented mutation functions.
|
int |
getNumberOfRecombinationFunctions()
Returns the number of implemented crossover functions.
|
java.util.ArrayList<java.lang.Float> |
getOutput(java.util.ArrayList<java.lang.Float> input)
Provides the networks output for the given input
|
java.util.ArrayList<java.lang.Float> |
getStep(java.util.ArrayList<java.lang.Float> input) |
java.lang.String |
getUniqueName()
Returns a unique name of this representation calculated by its parameters/structure.
|
float |
getWeight(int nr,
int from) |
AbstractRepresentation |
loadFromXML(org.dom4j.Node nd)
Reconstructs this representation from the given XML node.
|
void |
mutateBias(float severity,
float p,
int method) |
void |
mutateWeight(float severity,
float p,
int method) |
void |
recombinationFunction(AbstractRepresentation other,
int method)
Specific implementation of the recombination function that initiates a crossover on this representation
and with the given representation with the provided function.
Use AbstractRepresentation.getNumberOfRecombinationFunctions() to obtain the number of implemented recombination functions. |
void |
reset()
Resets the representation to its base state.
|
clone, compareTo, getFitness, isEvaluated, mutate, setFitness, toString, xOverWith
getProperties, getPropertyValue, getTypeOfProperty, getXMLData, setProperties, setXMLData
public ThreeLayerNetwork(int inputnumber, int outputnumber, NESRandom random, java.util.Hashtable<java.lang.String,XMLFieldEntry> properties)
public java.lang.String getUniqueName()
AbstractRepresentation
getUniqueName
in class AbstractRepresentation
public int getNumberofMutationFunctions()
AbstractRepresentation
getNumberofMutationFunctions
in class AbstractRepresentation
public int getNumberOfRecombinationFunctions()
AbstractRepresentation
getNumberOfRecombinationFunctions
in class AbstractRepresentation
public void mutateBias(float severity, float p, int method)
public void mutateWeight(float severity, float p, int method)
public void recombinationFunction(AbstractRepresentation other, int method)
AbstractRepresentation
AbstractRepresentation.getNumberOfRecombinationFunctions()
to obtain the number of implemented recombination functions.public float activate(float x)
public void reset()
AbstractRepresentation
reset
in class AbstractRepresentation
public java.util.ArrayList<java.lang.Float> getOutput(java.util.ArrayList<java.lang.Float> input)
getOutput
in class AbstractRepresentation
input
- The list of input values to be processed.public java.util.ArrayList<java.lang.Float> getStep(java.util.ArrayList<java.lang.Float> input)
public double diffTo(AbstractRepresentation o)
AbstractRepresentation
diffTo
in class AbstractRepresentation
o
- The other representation to compare to.public AbstractRepresentation cloneFunction()
AbstractRepresentation
public float getWeight(int nr, int from)
public org.dom4j.Element exportToXmlElement(org.dom4j.Element element)
exportToXmlElement
in class AbstractRepresentation
element
- The root element to be used for saving.public AbstractRepresentation loadFromXML(org.dom4j.Node nd)
AbstractRepresentation
loadFromXML
in class AbstractRepresentation
nd
- The root XML node to load the data from.public java.util.Hashtable<java.lang.String,java.lang.String> getDetails()
AbstractRepresentation
getDetails
in class AbstractRepresentation
public void exportToFile(java.io.File saveFile)
AbstractRepresentation
exportToFile
in class AbstractRepresentation
saveFile
- The file to be saved to