#include <SimpleNeuron.h>
Inheritance diagram for annie::SimpleNeuron:

Public Methods | |
| SimpleNeuron (int label, bool hasBias=true) | |
| virtual void | setBias (real bias) |
| virtual bool | hasBias () |
| Is the neuron allowed to have a bias? More... | |
| virtual real | getBias () |
| The bias of the neuron, 0.0 if it's not allowed to have a bias. More... | |
| virtual void | removeBias () |
| Sets bias to 0.0 and prevents the neuron from having a bias. More... | |
| virtual void | setDesiredOutput (real desired) |
| virtual void | setActivationFunction (ActivationFunction f, ActivationFunction df) |
| virtual void | connect (Neuron *from) |
| virtual void | connect (Neuron *from, real weight) |
| virtual void | calculateNewWeights (real learningRate, real momentum=0.0) |
| virtual void | update () |
| virtual std::string | toString () |
| |
| virtual const char * | getClassName () |
| Returns "SimpleNeuron". More... | |
| virtual real | getWeight (Neuron *from) |
Protected Methods | |
| virtual void | _recacheOutput () |
| |
| virtual void | _recacheError () |
| |
Protected Attributes | |
| bool | _hasBias |
| Is this neuron allowed to have a bias? More... | |
| real | _bias |
| If allowed to have a bias then the bias, otherwise 0.0. More... | |
| real | _deltaBias |
| The change in bias, calculated using the gradient descent rule. More... | |
| ActivationFunction | _dActivationFunction |
| The derivative of the activation function, required for gradient descent training. More... | |
|
||||||||||||
|
Creates a simple neuron with the given label.
|
|
|
Implements annie::Neuron. |
|
|
Implements annie::Neuron. Reimplemented in annie::RecurrentNeuron. |
|
||||||||||||
|
Calculates the adjustment to incoming weights based on the gradient descent rule (backpropagation). Doesn't actually update the weights, just sets the value.
|
|
||||||||||||
|
Connects the given neuron to this one, i.e., the output of the supplied neuron will be given as input to this neuron. The weight of the link will be the one supplied.
|
|
|
Connects the given neuron to this one, i.e., the output of the supplied neuron will be given as input to this neuron. A random weight is provided to the link
|
|
|
The bias of the neuron, 0.0 if it's not allowed to have a bias.
|
|
|
Returns "SimpleNeuron".
Implements annie::Neuron. Reimplemented in annie::RecurrentNeuron. |
|
|
Returns the weight of the link between the provided neuron and this neuron.
Reimplemented from annie::Neuron. |
|
|
Is the neuron allowed to have a bias?
|
|
|
Sets bias to 0.0 and prevents the neuron from having a bias.
|
|
||||||||||||
|
Sets the activation function and its derivative (required for error backpropagation)
|
|
|
Sets the bias of the neuron.
|
|
|
Sets the desired output of the neuron. Should be called only for output neurons, i.e., those whose output is not connected to anyone else. Setting the desired output at these neurons will form the basis of error backpropagation
Reimplemented in annie::RecurrentNeuron. |
|
|
Reimplemented from annie::Neuron. |
|
|
Updates the weights of incoming connections according to the values calculated using the gradient descent rule.
Reimplemented in annie::RecurrentNeuron. |
|
|
If allowed to have a bias then the bias, otherwise 0.0.
|
|
|
The derivative of the activation function, required for gradient descent training.
|
|
|
The change in bias, calculated using the gradient descent rule.
|
|
|
Is this neuron allowed to have a bias?
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002