|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.joone.structure.NodesAndWeights.Node
public class NodesAndWeights.Node
A node. A node sits inside a joone layer and at a given index. It is initially part of z but later on we will order z into Z and then K will be the index into Z at which this node is to be found. A node that is not an input node can be in U and all output nodes are in T. The sorted Z is indexed by K and has as its first few elements those nodes found in U - thus we can share the K index between these two sets. Nodes with initial states will be added to S. Note that we sort the nodes in Z so that nodes connected to the output layer comes first and nodes connected to the input layer comes last. In order to speed up processing, a bias node is also created and stored inside z and eventually in Z, typically in the final position in either z or Z. The bias node simply fires 1s all the time and is used to optimise the bias weight. It's derivative to anything is zero. Each node has weights attached to it. These weights carry the potential of other nodes into this one and are stored in the weights list. We are specifically interested in those weights that are firing from nodes in U and will store them in a separate list called I. Since we store the weights attached to each node inside the node itself, this then becomes the weight matrix. The matrix is generally sparse since a node is only connected to a few other nodes, and we gain some performance this way, at the cost of a lot of indexing, both here and in the weights themselves. Note that a node can potentially also have an initial state. Partly for performance reasons we access members in this class directly rather than via encapsulated messages.
Field Summary | |
---|---|
protected double |
bias
The bias if this is a bias node |
java.util.List<NodesAndWeights.Weight> |
fixedWeights
The list of unchangeable weights, also such as those coming from a direct synapse, that carry a singal into this node |
boolean |
hasInitialState
True if this node has an initial state |
java.util.List<NodesAndWeights.Weight> |
I
The list of weights that carry a signal into this node from a node in U |
protected int |
index
The index into the layer at which this node is found |
boolean |
inU
True if this node is in U, false if not |
boolean |
isInput
True if this node is connected to the input layer |
boolean |
isOutput
True if this node is connected to the output layer |
int |
K
The node's number in Z. |
protected Layer |
layer
The layer at which this node is found |
protected double |
maximumInitialStateMagnitude
The initial state maximum magnitude. |
int |
order
The node's order |
java.util.List<NodesAndWeights.Weight> |
weights
The list of changeable weights that carry a signal into this node |
Constructor Summary | |
---|---|
NodesAndWeights.Node(double bias)
Create a new bias node, typically with a bias value of 1 |
|
NodesAndWeights.Node(Layer layer,
int index,
int order)
Create a new node from a joone layer and also check to see if it has a valid initial state |
Method Summary | |
---|---|
void |
addInitialState(double delta)
Change the initial state by adding to it, also update the state's delta |
double |
getDefaultState()
Retrieve the default state of the node |
double |
getDerivative()
Retrieve the derivative of the node |
double |
getInitialState()
Get the initial state |
double |
getMaximumState()
The maximum allowable value of a node |
double |
getMinimumState()
The minimum allowable value of a node |
double |
getValue()
Retrieve the current value of this node |
void |
setInitialState(double initialState)
Set the initial state of the node, if any |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double bias
protected Layer layer
protected int index
public int K
public boolean inU
public boolean isOutput
public boolean isInput
public boolean hasInitialState
public int order
protected double maximumInitialStateMagnitude
public java.util.List<NodesAndWeights.Weight> weights
public java.util.List<NodesAndWeights.Weight> I
public java.util.List<NodesAndWeights.Weight> fixedWeights
Constructor Detail |
---|
public NodesAndWeights.Node(double bias)
public NodesAndWeights.Node(Layer layer, int index, int order)
Method Detail |
---|
public double getValue()
public double getDerivative()
public double getMinimumState()
public double getMaximumState()
public double getDefaultState()
public void setInitialState(double initialState)
public double getInitialState()
public void addInitialState(double delta)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |