org.encog.neural.pattern
Class PNNPattern
- java.lang.Object
-
- org.encog.neural.pattern.PNNPattern
-
- All Implemented Interfaces:
- NeuralNetworkPattern
public class PNNPattern extends java.lang.Object implements NeuralNetworkPattern
Pattern to create a PNN.
-
-
Constructor Summary
Constructors Constructor and Description PNNPattern()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddHiddenLayer(int count)Add a hidden layer.voidclear()Clear out any hidden neurons.MLMethodgenerate()Generate the RSOM network.intgetInputNeurons()PNNKernelTypegetKernel()PNNOutputModegetOutmodel()intgetOutputNeurons()voidsetActivationFunction(ActivationFunction activation)Set the activation function.voidsetInputNeurons(int count)Set the input neuron count.voidsetKernel(PNNKernelType kernel)Set the kernel type.voidsetOutmodel(PNNOutputMode outmodel)Set the output model.voidsetOutputNeurons(int count)Set the output neuron count.
-
-
-
Method Detail
-
addHiddenLayer
public void addHiddenLayer(int count)
Add a hidden layer. PNN networks do not have hidden layers, so this will throw an error.- Specified by:
addHiddenLayerin interfaceNeuralNetworkPattern- Parameters:
count- The number of hidden neurons.
-
clear
public void clear()
Clear out any hidden neurons.- Specified by:
clearin interfaceNeuralNetworkPattern
-
generate
public MLMethod generate()
Generate the RSOM network.- Specified by:
generatein interfaceNeuralNetworkPattern- Returns:
- The neural network.
-
getInputNeurons
public int getInputNeurons()
- Returns:
- The number of input neurons.
-
getKernel
public PNNKernelType getKernel()
- Returns:
- The kernel.
-
getOutmodel
public PNNOutputMode getOutmodel()
- Returns:
- The output model.
-
getOutputNeurons
public int getOutputNeurons()
- Returns:
- The number of output neurons.
-
setActivationFunction
public void setActivationFunction(ActivationFunction activation)
Set the activation function. A PNN uses a linear activation function, so this method throws an error.- Specified by:
setActivationFunctionin interfaceNeuralNetworkPattern- Parameters:
activation- The activation function to use.
-
setInputNeurons
public void setInputNeurons(int count)
Set the input neuron count.- Specified by:
setInputNeuronsin interfaceNeuralNetworkPattern- Parameters:
count- The number of neurons.
-
setKernel
public void setKernel(PNNKernelType kernel)
Set the kernel type.- Parameters:
kernel- The kernel type.
-
setOutmodel
public void setOutmodel(PNNOutputMode outmodel)
Set the output model.- Parameters:
outmodel- The output model.
-
setOutputNeurons
public void setOutputNeurons(int count)
Set the output neuron count.- Specified by:
setOutputNeuronsin interfaceNeuralNetworkPattern- Parameters:
count- The number of neurons.
-
-
DMelt 3.0 © DataMelt by jWork.ORG