|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.BasicML
org.encog.neural.neat.NEATNetwork
public class NEATNetwork
Implements a NEAT network as a synapse between two layers. In Encog, a NEAT network is created by using a NEATSynapse between an input and output layer. NEAT networks only have an input and an output layer. There are no actual hidden layers. Rather this synapse will evolve many hidden neurons that have connections that are not easily defined by layers. Connections can be feedforward, recurrent, or self-connected. NEAT networks relieve the programmer of the need to define the hidden layer structure of the neural network. The output from the neural network can be calculated normally or using a snapshot. The snapshot mode is slower, but it can be more accurate. The snapshot handles recurrent layers better, as it takes the time to loop through the network multiple times to "flush out" the recurrent links. NeuroEvolution of Augmenting Topologies (NEAT) is a genetic algorithm for the generation of evolving artificial neural networks. It was developed by Ken Stanley while at The University of Texas at Austin. http://www.cs.ucf.edu/~kstanley/
| Field Summary | |
|---|---|
static String |
PROPERTY_LINKS
|
static String |
PROPERTY_NETWORK_DEPTH
|
static String |
PROPERTY_SNAPSHOT
|
| Constructor Summary | |
|---|---|
NEATNetwork()
Default constructor. |
|
NEATNetwork(int inputCount,
int outputCount)
Construct a NEAT network. |
|
NEATNetwork(int inputCount,
int outputCount,
List<NEATNeuron> neurons,
ActivationFunction activationFunction,
ActivationFunction outputActivationFunction,
int networkDepth)
Construct a NEAT synapse. |
|
| Method Summary | |
|---|---|
double |
calculateError(MLDataSet data)
Calculate the error for this neural network. |
void |
clearContext()
Clear any context from previous runs. |
MLData |
compute(MLData input)
Compute the output from this synapse. |
ActivationFunction |
getActivationFunction()
|
int |
getInputCount()
|
int |
getNetworkDepth()
|
List<NEATNeuron> |
getNeurons()
|
ActivationFunction |
getOutputActivationFunction()
|
int |
getOutputCount()
|
boolean |
isSnapshot()
|
void |
setActivationFunction(ActivationFunction activationFunction)
Set the activation function. |
void |
setInputCount(int i)
|
void |
setNetworkDepth(int i)
|
void |
setOutputActivationFunction(ActivationFunction outputActivationFunction)
|
void |
setOutputCount(int i)
|
void |
setSnapshot(boolean snapshot)
Sets if snapshot is used. |
void |
updateProperties()
Update any objeccts when a property changes. |
| Methods inherited from class org.encog.ml.BasicML |
|---|
getProperties, getPropertyDouble, getPropertyLong, getPropertyString, setProperty, setProperty, setProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_NETWORK_DEPTH
public static final String PROPERTY_LINKS
public static final String PROPERTY_SNAPSHOT
| Constructor Detail |
|---|
public NEATNetwork()
public NEATNetwork(int inputCount,
int outputCount,
List<NEATNeuron> neurons,
ActivationFunction activationFunction,
ActivationFunction outputActivationFunction,
int networkDepth)
inputCount - The number of input neurons.outputCount - The number of output neurons.neurons - The neurons in this synapse.activationFunction - The activation function to use.networkDepth - The depth of the network.
public NEATNetwork(int inputCount,
int outputCount)
inputCount - The input count.outputCount - The output count.| Method Detail |
|---|
public void clearContext()
clearContext in interface MLContextpublic MLData compute(MLData input)
compute in interface MLRegressioninput - The input to this synapse.
public ActivationFunction getActivationFunction()
public int getNetworkDepth()
public List<NEATNeuron> getNeurons()
public boolean isSnapshot()
public void setActivationFunction(ActivationFunction activationFunction)
activationFunction - The activation function.public void setSnapshot(boolean snapshot)
snapshot - True if snapshot is used.public int getInputCount()
getInputCount in interface MLInputpublic int getOutputCount()
getOutputCount in interface MLOutputpublic void updateProperties()
MLProperties
updateProperties in interface MLPropertiesupdateProperties in class BasicMLpublic void setInputCount(int i)
public void setOutputCount(int i)
public void setNetworkDepth(int i)
public ActivationFunction getOutputActivationFunction()
public void setOutputActivationFunction(ActivationFunction outputActivationFunction)
outputActivationFunction - the outputActivationFunction to setpublic double calculateError(MLDataSet data)
calculateError in interface MLErrordata - The training set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||