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, xOverWithgetProperties, getPropertyValue, getTypeOfProperty, getXMLData, setProperties, setXMLDatapublic ThreeLayerNetwork(int inputnumber,
int outputnumber,
NESRandom random,
java.util.Hashtable<java.lang.String,XMLFieldEntry> properties)
public java.lang.String getUniqueName()
AbstractRepresentationgetUniqueName in class AbstractRepresentationpublic int getNumberofMutationFunctions()
AbstractRepresentationgetNumberofMutationFunctions in class AbstractRepresentationpublic int getNumberOfRecombinationFunctions()
AbstractRepresentationgetNumberOfRecombinationFunctions in class AbstractRepresentationpublic void mutateBias(float severity,
float p,
int method)
public void mutateWeight(float severity,
float p,
int method)
public void recombinationFunction(AbstractRepresentation other, int method)
AbstractRepresentationAbstractRepresentation.getNumberOfRecombinationFunctions() to obtain the number of implemented recombination functions.public float activate(float x)
public void reset()
AbstractRepresentationreset in class AbstractRepresentationpublic java.util.ArrayList<java.lang.Float> getOutput(java.util.ArrayList<java.lang.Float> input)
getOutput in class AbstractRepresentationinput - 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)
AbstractRepresentationdiffTo in class AbstractRepresentationo - The other representation to compare to.public AbstractRepresentation cloneFunction()
AbstractRepresentationpublic float getWeight(int nr,
int from)
public org.dom4j.Element exportToXmlElement(org.dom4j.Element element)
exportToXmlElement in class AbstractRepresentationelement - The root element to be used for saving.public AbstractRepresentation loadFromXML(org.dom4j.Node nd)
AbstractRepresentationloadFromXML in class AbstractRepresentationnd - The root XML node to load the data from.public java.util.Hashtable<java.lang.String,java.lang.String> getDetails()
AbstractRepresentationgetDetails in class AbstractRepresentationpublic void exportToFile(java.io.File saveFile)
AbstractRepresentationexportToFile in class AbstractRepresentationsaveFile - The file to be saved to