|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.networks.synapse.neat.NEATSynapse
public class NEATSynapse
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/
| Constructor Summary | |
|---|---|
NEATSynapse()
Default constructor. |
|
NEATSynapse(BasicLayer fromLayer,
BasicLayer toLayer,
List<NEATNeuron> neurons,
ActivationFunction activationFunction,
int networkDepth)
Construct a NEAT synapse. |
|
NEATSynapse(Layer fromLayer,
Layer toLayer)
Construct a NEAT synapse. |
|
| Method Summary | |
|---|---|
void |
clearContext()
Clear any context from previous runs. |
Object |
clone()
|
NeuralData |
compute(NeuralData input)
Compute the output from this synapse. |
Persistor |
createPersistor()
Create a persistor for this object. |
ActivationFunction |
getActivationFunction()
|
EncogCollection |
getCollection()
|
String |
getDescription()
|
Layer |
getFromLayer()
|
int |
getFromNeuronCount()
|
Matrix |
getMatrix()
Get the weight matrix. |
int |
getMatrixSize()
Get the size of the matrix, or zero if one is not defined. |
String |
getName()
|
int |
getNetworkDepth()
|
List<NEATNeuron> |
getNeurons()
|
Layer |
getToLayer()
|
int |
getToNeuronCount()
|
SynapseType |
getType()
|
boolean |
isSelfConnected()
|
boolean |
isSnapshot()
|
boolean |
isTeachable()
|
void |
setActivationFunction(ActivationFunction activationFunction)
Set the activation function. |
void |
setCollection(EncogCollection collection)
|
void |
setDescription(String description)
Not used. |
void |
setFromLayer(Layer fromLayer)
Set the from layer for this synapse. |
void |
setMatrix(Matrix matrix)
Assign a new weight matrix to this layer. |
void |
setName(String name)
Not used. |
void |
setSnapshot(boolean snapshot)
Sets if snapshot is used. |
void |
setToLayer(Layer toLayer)
Set the target layer from this synapse. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NEATSynapse()
public NEATSynapse(BasicLayer fromLayer,
BasicLayer toLayer,
List<NEATNeuron> neurons,
ActivationFunction activationFunction,
int networkDepth)
fromLayer - The input layer.toLayer - The output layer.neurons - The neurons in this synapse.activationFunction - The activation function to use.networkDepth - The depth of the network.
public NEATSynapse(Layer fromLayer,
Layer toLayer)
fromLayer - The input layer.toLayer - The output layer.| Method Detail |
|---|
public void clearContext()
clearContext in interface ContextClearablepublic Object clone()
clone in interface Synapseclone in class Objectpublic NeuralData compute(NeuralData input)
compute in interface Synapseinput - The input to this synapse.
public Persistor createPersistor()
EncogPersistedObject
createPersistor in interface EncogPersistedObjectpublic ActivationFunction getActivationFunction()
public String getDescription()
getDescription in interface EncogPersistedObjectpublic Layer getFromLayer()
getFromLayer in interface Synapsepublic int getFromNeuronCount()
getFromNeuronCount in interface Synapsepublic Matrix getMatrix()
getMatrix in interface Synapsepublic int getMatrixSize()
getMatrixSize in interface Synapsepublic String getName()
getName in interface EncogPersistedObjectpublic int getNetworkDepth()
public List<NEATNeuron> getNeurons()
public Layer getToLayer()
getToLayer in interface Synapsepublic int getToNeuronCount()
getToNeuronCount in interface Synapsepublic SynapseType getType()
getType in interface Synapsepublic boolean isSelfConnected()
isSelfConnected in interface Synapsepublic boolean isSnapshot()
public boolean isTeachable()
isTeachable in interface Synapsepublic void setActivationFunction(ActivationFunction activationFunction)
activationFunction - The activation function.public void setDescription(String description)
setDescription in interface EncogPersistedObjectdescription - Not used.public void setFromLayer(Layer fromLayer)
setFromLayer in interface SynapsefromLayer - The from layer for this synapse.public void setMatrix(Matrix matrix)
setMatrix in interface Synapsematrix - The new matrix.public void setName(String name)
setName in interface EncogPersistedObjectname - not used.public void setSnapshot(boolean snapshot)
snapshot - True if snapshot is used.public void setToLayer(Layer toLayer)
setToLayer in interface SynapsetoLayer - The target layer from this synapse.public EncogCollection getCollection()
getCollection in interface EncogPersistedObjectpublic void setCollection(EncogCollection collection)
setCollection in interface EncogPersistedObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||