Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RecurrentNeuron Class Reference

A neuron used for recurrent networks. More...

#include <RecurrentNeuron.h>

Inheritance diagram for RecurrentNeuron:

Inheritance graph
Collaboration diagram for RecurrentNeuron:

Collaboration graph
List of all members.

Public Member Functions

 RecurrentNeuron (int label, real bias, real activation=0.)
 Creates a recurrent neuron.

void setActivationFunction (ActivationFunction f)
virtual void update ()
 Recompute output.

virtual void invalidateOutputCache ()
 Invalidates the output cache of this neuron.

virtual real getOutput () const
 Returns the last output of the neuron.

virtual const char * getClassName () const
 Returns "RecurrentNeuron".

virtual void reset (real initialActivation)
 Resets the neuron to given state.

virtual void calculateNewWeights (real learningRate) NONSENSE virtual void setDesiredOutput(real desired) NONSENSE protected
 Not sensible.

Public Attributes

real _bias
 If allowed to have a bias then the bias, otherwise 0.0.

Detailed Description

A neuron used for recurrent networks.

These neurons have a concept of time. Thus, their output starts from an initial state and then as time progresses their output may change.

Recurrent networks allow cycles in the graph formed by connections between neurons, which are not allowed by simple multi-layer networks. For example, consider a network in which a recurrent neuron is connected to itself. Output now becomes time dependent. output(time=0) = an initial, fixed value. output(time=1) = weight_of_link * output(0) output(time=t) = weight_of_link * output(t-1) etc.

A recurrent neuron has all the features of a simple neuron and adds the concept of time, hence the RecurrentNeuron class is a sub-class of the SimpleNeuron class

major changes: 6/2004 OP: As it is no longer used in Hopfield, it was reworked (just a little bit) to fit into the more general RecurrentNetwork. Storing of time and initialState was removed to save time/space. Also, bias is on by default (set it to 0, if you don't want it)



Constructor & Destructor Documentation

RecurrentNeuron int  label,
real  bias,
real  activation = 0.

Creates a recurrent neuron.

The default initial value is 0, thus at time=0 the output of the neuron will be 0. To change use reset

label The label to give to the neuron
hasBias Allow this neuron to have a bias?
See also:

Member Function Documentation

virtual void calculateNewWeights real  learningRate  )  [inline, virtual]

Not sensible.

virtual const char* getClassName  )  const [inline, virtual]

Returns "RecurrentNeuron".

Reimplemented from SimpleNeuron.

virtual real getOutput  )  const [virtual]

Returns the last output of the neuron.

At time 0 this will be the initial value which is set using reset(), and which is zero by default. Otherwise it will be the output computed before last step()

the output of this neuron at the current time

Reimplemented from Neuron.

virtual void invalidateOutputCache  )  [inline, virtual]

Invalidates the output cache of this neuron.

Should be called on any structural change Structural changes such as changes to the input or output links and/or their weights should invalidate the cache of the neuron using this function. Causes the cache of all neurons who receive input from this neuron to be invalidated as well.

Reimplemented from Neuron.

virtual void reset real  initialActivation  )  [virtual]

Resets the neuron to given state.

initialActivation The forced activation neuron.

void setActivationFunction ActivationFunction  f  )  [inline]

virtual void update  )  [virtual]

Recompute output.

Reimplemented from AbstractNeuron.

Member Data Documentation

real _bias

If allowed to have a bias then the bias, otherwise 0.0.

Reimplemented from AbstractNeuron.

The documentation for this class was generated from the following file:
Generated on Fri Jun 18 13:19:19 2004 for Annie by doxygen 1.3.5