public class NodesAndWeights
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
NodesAndWeights.Node
A node.
|
class |
NodesAndWeights.Weight
A weight.
|
Modifier and Type | Field and Description |
---|---|
java.util.List<NodesAndWeights.Node> |
I
The input nodes, a subset of Z, specifically the last few nodes in Z,
that are connected to the input layer.
|
int |
inputNodeCount
The number of input nodes, which appear as the final nodes in the Z array
|
int |
outputNodeCount
The number of output nodes, which appear as the first nodes in the Z array
|
java.util.List<NodesAndWeights.Node> |
S
The nodes that have an initial state.
|
java.util.List<NodesAndWeights.Node> |
T
The output nodes, a subset of Z and used to speed up calculations
|
java.util.List<NodesAndWeights.Node> |
U
The nodes in U, a subset of Z, specifically the first few nodes in Z, but those
that are not input nodes.
|
java.util.List<NodesAndWeights.Weight> |
weights
List of all weights, typically used when setting up an optimisation problem
|
protected java.util.List<NodesAndWeights.Node> |
z
The unclassified nodes, referred to as the z array
|
java.util.List<NodesAndWeights.Node> |
Z
The same as z, but this time classified and ordered so that nodes in U come first.
|
Constructor and Description |
---|
NodesAndWeights(NeuralNet network,
double maximumWeightMagnitude,
boolean reset)
Create a new instance of NodesAndWeights, decomposing the given network
into nodes, initial states and attached weights
|
Modifier and Type | Method and Description |
---|---|
protected NodesAndWeights.Weight |
getFixedWeight(NodesAndWeights.Node input,
NodesAndWeights.Node output)
Determine the fixed weight between an input and a output node.
|
protected NodesAndWeights.Weight |
getWeight(NodesAndWeights.Node input,
NodesAndWeights.Node output)
Determine the weight between an input and a output node.
|
protected void |
init(NeuralNet network,
double maximumWeightMagnitude,
boolean reset)
Initialise the underlying parameters and structures.
|
protected boolean |
isFixedLinked(NodesAndWeights.Node input,
NodesAndWeights.Node output)
Determine if there exists a fixed link or weight between two nodes.
|
protected boolean |
isLinked(NodesAndWeights.Node input,
NodesAndWeights.Node output)
Determine if there exists a link or weight between two nodes.
|
void |
printWeights(java.io.PrintStream out)
Helper function to print out the weight matrix
|
protected java.util.List<NodesAndWeights.Node> z
public java.util.List<NodesAndWeights.Node> Z
public java.util.List<NodesAndWeights.Node> T
public java.util.List<NodesAndWeights.Node> U
public java.util.List<NodesAndWeights.Node> I
public java.util.List<NodesAndWeights.Node> S
public java.util.List<NodesAndWeights.Weight> weights
public int inputNodeCount
public int outputNodeCount
public NodesAndWeights(NeuralNet network, double maximumWeightMagnitude, boolean reset)
network
- network to detanglemaximumWeightMagnitude
- the maximum allowable weight magnitude or 0 for no maximumreset
- if true, will reset all input and context layer biases to zero.
This is a cosmetic step, as these are often randomised but not
used, but may have an impact on networks that use something other
than a linear layer as input layer.protected boolean isLinked(NodesAndWeights.Node input, NodesAndWeights.Node output)
protected NodesAndWeights.Weight getWeight(NodesAndWeights.Node input, NodesAndWeights.Node output)
protected boolean isFixedLinked(NodesAndWeights.Node input, NodesAndWeights.Node output)
protected NodesAndWeights.Weight getFixedWeight(NodesAndWeights.Node input, NodesAndWeights.Node output)
protected void init(NeuralNet network, double maximumWeightMagnitude, boolean reset)
public void printWeights(java.io.PrintStream out)
Submit Feedback to pmarrone@users.sourceforge.net