org.encog.neural.neat
public class NEATNetwork extends Object implements MLRegression, MLError, Serializable
Constructor and Description |
---|
NEATNetwork(int inputNeuronCount,
int outputNeuronCount,
List<NEATLink> connectionArray,
ActivationFunction[] theActivationFunctions)
Construct a NEAT network.
|
Modifier and Type | Method and Description |
---|---|
double |
calculateError(MLDataSet data)
Calculate the error for this neural network.
|
MLData |
compute(MLData input)
Compute the output from this synapse.
|
int |
getActivationCycles() |
ActivationFunction[] |
getActivationFunctions() |
int |
getInputCount() |
NEATLink[] |
getLinks() |
int |
getOutputCount() |
int |
getOutputIndex() |
double[] |
getPostActivation() |
double[] |
getPreActivation() |
double |
getRelaxationThreshold() |
boolean |
isHasRelaxed() |
void |
setActivationCycles(int activationCycles)
Set the number of activation cycles to use.
|
void |
setHasRelaxed(boolean hasRelaxed)
Set true, if the network has relaxed and values no longer changing.
|
void |
setRelaxationThreshold(double relaxationThreshold)
The amount of change allowed before the network is considered to have
relaxed.
|
public NEATNetwork(int inputNeuronCount, int outputNeuronCount, List<NEATLink> connectionArray, ActivationFunction[] theActivationFunctions)
inputNeuronCount
- The input neuron count.outputNeuronCount
- The output neuron count.connectionArray
- The links.theActivationFunctions
- The activation functions.public double calculateError(MLDataSet data)
calculateError
in interface MLError
data
- The training set.public MLData compute(MLData input)
compute
in interface MLRegression
input
- The input to this synapse.public int getActivationCycles()
public ActivationFunction[] getActivationFunctions()
public int getInputCount()
getInputCount
in interface MLInput
public NEATLink[] getLinks()
public int getOutputCount()
getOutputCount
in interface MLOutput
public int getOutputIndex()
public double[] getPostActivation()
public double[] getPreActivation()
public double getRelaxationThreshold()
public boolean isHasRelaxed()
public void setActivationCycles(int activationCycles)
activationCycles
- The number of activation cycles.public void setHasRelaxed(boolean hasRelaxed)
hasRelaxed
- True if the network has relaxed.public void setRelaxationThreshold(double relaxationThreshold)
relaxationThreshold
- The relaxation threshold.Copyright © 2014. All Rights Reserved.