|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNetwork
RNN
The RNN class is based on the Elman Network, which has recurrency at the Hidden Layer. In addition, there is a self loop at the context layer
Constructor Summary | |
RNN(int inputs,
int hiddens,
double memoryDepth,
int slope,
double learningRate,
double momentum,
int totalEpochs,
String fileID)
This constructor for the RNN specifies the number of Input Neurons and Hidden Neurons,
the memory depth, the slope of their activation functions, the learning rate, the momentum,
the number of training, epochs and set a network topology id for use with log files. |
Method Summary | |
protected void |
adjustHiddenWeights()
Adjusts the weights of the Synapses between the Hidden and Input Neurons and Bias Neurons |
protected void |
adjustOutputWeights()
Adjusts the weights of the Synapses between the Output and Hidden Neurons and Bias Neurons |
protected double |
calculateError()
Calculates the output error |
protected void |
calculateHiddenError()
Calculates the hidden error term |
protected void |
calculateHiddenOutput()
Calculates the output of the HiddenNeurons |
protected void |
calculateHiddenWeightChange()
Calculates the weight change to be made to the Synapses between the Hidden and Input Neurons and Bias Neurons |
protected void |
calculateOutputError()
Calculates the output error term |
protected void |
calculateOutputWeightChange()
Calculates the weight change to be made to the Synapses between the Output and Hidden Neurons and Bias Neurons |
protected void |
connectNeurons()
Connects the Neurons |
protected void |
createNeurons()
Creates the Neurons |
protected void |
createNeurons(double memoryDepth)
Creates the Neurons |
protected BiasNeuron |
getBiasHidden()
Gets the BiasNeuron to the HiddenNeurons |
protected BiasNeuron |
getBiasOutput()
Gets the BiasNeuron to the OutputNeuron |
protected Synapse[] |
getBiasToHidden()
Gets the Synapses between the BiasNeuron and the HiddenNeurons |
protected Synapse |
getBiasToHidden(int i)
Gets a Synapse between the BiasNeuron and a HiddenNeuron |
protected Synapse |
getBiasToOutput()
Gets the Synapse connecting the BiasNeuron to the OutputNeuron |
protected double |
getHiddenErrorTerm(int i)
Gets a hiddenErrorTerm |
protected Neuron |
getHiddenNeuron(int i)
Gets a HiddenNeuron |
protected Neuron[] |
getHiddenNeurons()
Gets the HiddenNeurons |
protected Synapse[] |
getHiddenToOutput()
Gets the Synapses between the HiddenNeurons and the OutputNeuron |
protected Synapse |
getHiddenToOutput(int i)
Gets a Synapse between a HiddenNeuron and the OutputNeuron |
protected double[] |
getInputData()
Gets the input data |
protected double |
getInputData(int i)
Gets input data at a given position |
protected Neuron |
getInputNeuron(int i)
Gets an InputNeuron |
protected Neuron[] |
getInputNeurons()
Gets the InputNeurons |
protected Synapse[][] |
getInputToHidden()
Gets all the Synapses between the InputNeurons and the HiddenNeurons |
protected Synapse[] |
getInputToHidden(int i)
Gets the Synapses between an InputNeuron and the HiddenNeurons |
protected Synapse |
getInputToHidden(int i,
int j)
Gets the Synapse between an InputNeuron and a HiddenNeuron |
protected double |
getLearningRate()
Gets the learning rate |
protected double |
getMomentum()
Gets the momentum |
protected int |
getNextInput()
Gets the next input position |
protected double |
getOutputErrorTerm()
Gets the OutputErrorTerm |
protected int |
getSlope()
Gets the slope |
protected void |
initialise()
Initialises the network with data |
protected void |
sendToHidden()
Transfers the weighted values to the Hidden Neurons |
protected void |
sendToOutput()
Transfers the weighted values to the Output Neuron |
protected void |
setBiasHidden(BiasNeuron biasHidden)
Sets the BiasNeuron to the HiddenNeurons |
protected void |
setBiasOutput(BiasNeuron biasOutput)
Sets the BiasNeuron to the OutputNeuron |
protected void |
setHiddenErrorTerm(double errorTerm,
int i)
Sets a hiddenErrorTerm |
protected void |
setHiddenNeuron(HiddenNeuron hiddenNeuron,
int i)
Sets a HiddenNeuron |
protected void |
setInputNeuron(InputNeuron inputNeuron,
int i)
Sets an InputNeuron |
protected void |
setOutputNeuron(OutputNeuron outputNeuron)
Sets the OutputNeuron |
protected void |
setTargetOutput(double targetOutput)
Sets the target output |
void |
test(double[] data)
Starts testing the network |
void |
train(double[] data)
Trains the network |
void |
validate(double[] data)
Starts validating the network |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RNN(int inputs, int hiddens, double memoryDepth, int slope, double learningRate, double momentum, int totalEpochs, String fileID)
RNN
specifies the number of Input Neurons and Hidden Neurons,
the memory depth, the slope of their activation functions, the learning rate, the momentum,
the number of training, epochs and set a network topology id for use with log files.
inputs
- The number of Input Neuronshiddens
- The number of Hidden NeuronsmemoryDepth
- The memory depthslope
- The slope of their activation functionslearningRate
- The learning ratemomentum
- The momentumtotalEpochs
- The number of training epochsfileID
- The network topology idMethod Detail |
protected void createNeurons(double memoryDepth)
memoryDepth
- Their memory depthprotected void connectNeurons()
protected void sendToHidden()
protected void sendToOutput()
protected void initialise()
protected void createNeurons()
protected void calculateOutputError()
protected void calculateHiddenError()
protected void calculateOutputWeightChange()
protected void adjustOutputWeights()
protected void calculateHiddenWeightChange()
protected void adjustHiddenWeights()
protected void calculateHiddenOutput()
protected double calculateError()
public void train(double[] data)
public void test(double[] data)
public void validate(double[] data)
protected int getSlope()
protected double getLearningRate()
protected double getMomentum()
protected void setTargetOutput(double targetOutput)
targetOutput
- the target outputprotected void setOutputNeuron(OutputNeuron outputNeuron)
outputNeuron
- the OutputNeuronprotected double getOutputErrorTerm()
protected double getHiddenErrorTerm(int i)
i
- its position
protected void setHiddenErrorTerm(double errorTerm, int i)
errorTerm
- the new error termi
- its positionprotected int getNextInput()
protected Synapse getBiasToOutput()
protected void setBiasHidden(BiasNeuron biasHidden)
biasHidden
- the BiasNeuron to the HiddenNeuronsprotected BiasNeuron getBiasHidden()
protected void setBiasOutput(BiasNeuron biasOutput)
biasOutput
- the BiasNeuron to the OutputNeuronprotected BiasNeuron getBiasOutput()
protected Synapse[] getBiasToHidden()
protected Synapse getBiasToHidden(int i)
i
- its position
protected Synapse getHiddenToOutput(int i)
i
- its position
protected Synapse[] getHiddenToOutput()
protected Synapse[][] getInputToHidden()
protected Synapse[] getInputToHidden(int i)
i
- its position
protected Synapse getInputToHidden(int i, int j)
i
- its x positionj
- its y position
protected Neuron getInputNeuron(int i)
i
- its position
protected Neuron[] getInputNeurons()
protected void setInputNeuron(InputNeuron inputNeuron, int i)
inputNeuron
- the new InputNeuroni
- its positionprotected Neuron getHiddenNeuron(int i)
i
- its position
protected Neuron[] getHiddenNeurons()
protected void setHiddenNeuron(HiddenNeuron hiddenNeuron, int i)
hiddenNeuron
- the new HiddenNeuroni
- its positionprotected double getInputData(int i)
i
- its position
protected double[] getInputData()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |