org.encog.neural.pattern
Class CPNPattern
- java.lang.Object
-
- org.encog.neural.pattern.CPNPattern
-
- All Implemented Interfaces:
- NeuralNetworkPattern
public class CPNPattern extends java.lang.Object implements NeuralNetworkPattern
Pattern that creates a CPN neural network.
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.StringTAG_INSTARThe tag for the INSTAR layer.static java.lang.StringTAG_OUTSTARThe tag for the OUTSTAR layer.
-
Constructor Summary
Constructors Constructor and Description CPNPattern()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddHiddenLayer(int count)Not used, will throw an error.voidclear()Clear any parameters that were set.MLMethodgenerate()Generate the network.voidsetActivationFunction(ActivationFunction activation)This method will throw an error.voidsetInputNeurons(int count)Set the number of input neurons.voidsetInstarCount(int instarCount)Set the number of neurons in the instar layer.voidsetOutputNeurons(int count)Set the number of output neurons.voidsetOutstarCount(int outstarCount)Set the number of neurons in the outstar level, this level is mapped to the "output" level.
-
-
-
Field Detail
-
TAG_INSTAR
public static final java.lang.String TAG_INSTAR
The tag for the INSTAR layer.- See Also:
- Constant Field Values
-
TAG_OUTSTAR
public static final java.lang.String TAG_OUTSTAR
The tag for the OUTSTAR layer.- See Also:
- Constant Field Values
-
-
Method Detail
-
addHiddenLayer
public void addHiddenLayer(int count)
Not used, will throw an error. CPN networks already have a predefined hidden layer called the instar layer.- Specified by:
addHiddenLayerin interfaceNeuralNetworkPattern- Parameters:
count- NOT USED
-
clear
public void clear()
Clear any parameters that were set.- Specified by:
clearin interfaceNeuralNetworkPattern
-
generate
public MLMethod generate()
Generate the network.- Specified by:
generatein interfaceNeuralNetworkPattern- Returns:
- The generated network.
-
setActivationFunction
public void setActivationFunction(ActivationFunction activation)
This method will throw an error. The CPN network uses predefined activation functions.- Specified by:
setActivationFunctionin interfaceNeuralNetworkPattern- Parameters:
activation- NOT USED
-
setInputNeurons
public void setInputNeurons(int count)
Set the number of input neurons.- Specified by:
setInputNeuronsin interfaceNeuralNetworkPattern- Parameters:
count- The input neuron count.
-
setInstarCount
public void setInstarCount(int instarCount)
Set the number of neurons in the instar layer. This level is essentially a hidden layer.- Parameters:
instarCount- The instar count.
-
setOutputNeurons
public void setOutputNeurons(int count)
Set the number of output neurons. Calling this method maps to setting the number of neurons in the outstar layer.- Specified by:
setOutputNeuronsin interfaceNeuralNetworkPattern- Parameters:
count- The count.
-
setOutstarCount
public void setOutstarCount(int outstarCount)
Set the number of neurons in the outstar level, this level is mapped to the "output" level.- Parameters:
outstarCount- The outstar count.
-
-
DMelt 3.0 © DataMelt by jWork.ORG