|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdlife.sys.SerializationBase
dlife.nn.NeuralNetwork
dlife.nn.FFNeuralNetwork
dlife.nn.ElmanNeuralNetwork
public class ElmanNeuralNetwork
Implementation of a fully connected multi-layer Elman neural network. The Elman neural network contains a set of recurrent connections from the last hidden layer to the input layer. These connections allow the network to develop a sense of time, where the output is determined not only by the current input but by past inputs and outputs.
Care must be taken in training an Elman neural network as the sequence of training inputs is relevant. The actual inputs to the network for each training pattern include those in the training pattern as well as the outputs of the last hidden layer as computed for the previous training pattern.
For fuller descriptions of an Elman neural network see:
| Field Summary | |
|---|---|
protected int |
numInputs
|
| Fields inherited from class dlife.nn.FFNeuralNetwork |
|---|
ffweights, layerInputs, layerOutputs, nType |
| Fields inherited from class dlife.nn.NeuralNetwork |
|---|
filteredInputs, filteredOutputs, rawInputs, rawOutputs |
| Constructor Summary | |
|---|---|
ElmanNeuralNetwork(double[][][] ffweights,
Neuron nType)
Construct a new ElmanNeuralNetwork by providing the weight matrix for the network. |
|
ElmanNeuralNetwork(int[] layers,
double[] weights,
Neuron nType)
Construct a new ElmanNeuralNetwork using the provided 1d array of weights. |
|
ElmanNeuralNetwork(int[] layers,
Neuron nType)
Construct a new ElmanNeuralNetwork with the specified number of neurons in the layers and using the specified type of Neuron. |
|
| Method Summary | |
|---|---|
void |
clearContext()
This method clears the data stored in the context units by setting them to 0. |
int |
numInputs()
Get the number of inputs that there are in this ElmanNeuralNetowrk. |
void |
propagate()
Propagate the current filtered input values through the network. |
| Methods inherited from class dlife.nn.FFNeuralNetwork |
|---|
getConnections, getFFWeights, getFFWeights1d, getLayerInputs, getLayerOutputs, getWeights, makeLayerInputs, makeLayerOutputs, numOutputs, randomizeWeights, read, setInputs |
| Methods inherited from class dlife.nn.NeuralNetwork |
|---|
evaluate, evaluate, getFilteredInputs, getFilteredOutputs, getInputFilter, getInputFilter, getOutputFilter, getOutputFilter, getRawInputs, getRawOutputs, setInputFilter, setInputFilter, setOutputFilter, setOutputFilter, setOutputs |
| Methods inherited from class dlife.sys.SerializationBase |
|---|
write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int numInputs
| Constructor Detail |
|---|
public ElmanNeuralNetwork(int[] layers,
Neuron nType)
throws IllegalArgumentException
layers - an array of ints specifying the number of neurons in each
layer of the network.nType - the type of neuron in the network.
IllegalArgumenException - if the network does not have at least one
hidden layer.
IllegalArgumentException
public ElmanNeuralNetwork(double[][][] ffweights,
Neuron nType)
throws IllegalArgumentException
ffweights - the weights matrix.nType - the type of Neuron to use for this network.
IllegalArgumentException - if the ffweights do not specify a fully
connected network.
IllegalArgumenException - if the network does not have at least one
hidden layer.
public ElmanNeuralNetwork(int[] layers,
double[] weights,
Neuron nType)
layers - an array of ints specifying the number of neurons in each
layer of the network.weights - the weights for this network.nType - the type of Neuron to use for this network.
illegalArgumentException - if ffweights does not contain the
correct number of weights.
IllegalArgumenException - if the network does not have at least one
hidden layer.| Method Detail |
|---|
public int numInputs()
numInputs in class FFNeuralNetwork
public void propagate()
throws IllegalStateException
propagate in class FFNeuralNetworkIllegalStateException - if this method is called before the inputs
have been set by a call to setInputs.public void clearContext()
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||