public class RTRL
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected NodesAndWeights |
nodesAndWeights
The network we are training
|
protected java.util.List<java.util.List<NodesAndWeights.Node>> |
nodesList
List of list of nodes that will be updated by each processor
|
protected double[][] |
p
The p matrix, p [ k ] [ij ] is node k's (in U) derivative with respect to weight ij
|
protected int |
patternCount
Pattern counter
|
protected int |
processorCount
Number of processors to use, 1 or less on a uniprocessor
|
protected double[][] |
updateP
The utility updateP matrix, used when updating the p matrix
|
protected java.util.List<java.util.List<NodesAndWeights.Weight>> |
weightsList
List of list of weights that will be updated by each processor
|
Constructor and Description |
---|
RTRL(NodesAndWeights nodesAndWeights)
Create a new instance of RTRL
|
Modifier and Type | Method and Description |
---|---|
int |
getProcessorCount()
Retrieve processor count
|
protected void |
init()
Initialise
|
void |
printP(java.io.PrintStream out)
Helper to print out the p matrix
|
protected void |
resetP()
Reset the p matrix in preparation for the next cycle - called at the end of a cycle
|
void |
setProcessorCount(int processorCount)
Set the number of processors to use
|
void |
update(double[] error)
Update RTRL
Call this with the most recent error pattern as soon as one
becomes available.
|
void |
updateCycle(double learningRate)
Update the weights
Call this once a full set of patterns were presented to the network
to update the weights
|
protected void |
updateDeltas(double[] error)
Update the weights' deltas.
|
protected void |
updateDeltas(double[] error,
java.util.List<NodesAndWeights.Weight> weights)
Update the given weights' deltas.
|
protected void |
updateP()
Update the p matrix - called after a pattern has been presented to the network
|
protected void |
updateP(java.util.List<NodesAndWeights.Node> nodes)
Update the p matrix for the given list of nodes
|
protected NodesAndWeights nodesAndWeights
protected double[][] p
protected double[][] updateP
protected int patternCount
protected int processorCount
protected java.util.List<java.util.List<NodesAndWeights.Node>> nodesList
protected java.util.List<java.util.List<NodesAndWeights.Weight>> weightsList
public RTRL(NodesAndWeights nodesAndWeights)
nodesAndWeights
- the network to be optimised's structureprotected void init()
public void setProcessorCount(int processorCount)
public int getProcessorCount()
protected void updateP(java.util.List<NodesAndWeights.Node> nodes)
protected void updateP()
protected void updateDeltas(double[] error, java.util.List<NodesAndWeights.Weight> weights)
error
- most recently seen error patternprotected void updateDeltas(double[] error)
error
- most recently seen error patternprotected void resetP()
public void update(double[] error)
error
- the most recently seen error patternpublic void updateCycle(double learningRate)
public void printP(java.io.PrintStream out)
out
- stream to which to dump the matrixSubmit Feedback to pmarrone@users.sourceforge.net