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

SimpleNeuron Class Reference

A simple perceptron - i.e., it takes as input the weighted sum of the outputs of the neurons connected to it. More...

#include <SimpleNeuron.h>

Inheritance diagram for SimpleNeuron:

Inheritance graph
[legend]
Collaboration diagram for SimpleNeuron:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SimpleNeuron (int label, bool hasBias=true)
 Creates a simple neuron with the given label.

virtual void setDesiredOutput (real desired)
 Sets the desired output of the neuron.

virtual void setActivationFunction (ActivationFunction f, ActivationFunction df)
 Sets the activation function and its derivative (required for error backpropagation).

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


Protected Member Functions

virtual void _recacheOutput () const
 Neuron::_recacheOutput.

virtual void _recacheError () const
 Neuron::_recacheError.


Protected Attributes

ActivationFunction _dActivationFunction
 The derivative of the activation function, required for gradient descent training.


Detailed Description

A simple perceptron - i.e., it takes as input the weighted sum of the outputs of the neurons connected to it.

Probably the first type of neuron you would come across in any introductory literature of neural networks.


Constructor & Destructor Documentation

SimpleNeuron int  label,
bool  hasBias = true
 

Creates a simple neuron with the given label.

Parameters:
label The label to be given to the neuron
hasBias true if the neuron is allowed to have a bias, false otherwise. Default is true
See also:
removeBias


Member Function Documentation

virtual void _recacheError  )  const [protected, virtual]
 

Neuron::_recacheError.

Implements AbstractNeuron.

virtual void _recacheOutput  )  const [protected, virtual]
 

Neuron::_recacheOutput.

Implements AbstractNeuron.

Reimplemented in KohonenNeuron.

virtual const char* getClassName  )  const [virtual]
 

Returns "SimpleNeuron".

Reimplemented from AbstractNeuron.

Reimplemented in RecurrentNeuron.

virtual void setActivationFunction ActivationFunction  f,
ActivationFunction  df
[virtual]
 

Sets the activation function and its derivative (required for error backpropagation).

Parameters:
f The activation function to be used
df The derivative of the activation function

virtual void setDesiredOutput real  desired  )  [virtual]
 

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

Parameters:
desired The desired output of this neuron
Exceptions:
Exception if the neuron is not an output neuron

Implements AbstractNeuron.


Member Data Documentation

ActivationFunction _dActivationFunction [protected]
 

The derivative of the activation function, required for gradient descent training.


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