neuralpp::Synapsis Class Reference

Class for managing synapsis. More...

#include <neural++.hpp>

List of all members.

Public Member Functions

 Synapsis ()
 Empty constructor (it does nothing).
 Synapsis (Neuron *i, Neuron *o, double(*a)(double))
 Constructor.
 Synapsis (Neuron *i, Neuron *o, double w, double(*a)(double))
 Constructor.
NeurongetIn () const
NeurongetOut () const
void setWeight (double w) throw (InvalidSynapticalWeightException)
 Set the weight of the synapsis.
void setDelta (double d) throw (InvalidSynapticalWeightException)
 It sets the delta (how much to change the weight after an update) of the synapsis.
double getWeight () const
 Return the weight of the synapsis.
double getDelta () const
 Return the delta of the synapsis.
double getPrevDelta () const
 Get the delta of the synapsis at the previous iteration.
double momentum (int N, int x) const
 Get the inertial momentum of a synapsis.

Private Attributes

double delta
double prev_delta
double weight
Neuronin
Neuronout
double(* actv_f )(double)


Detailed Description

Class for managing synapsis.

Don't use this class directly unless you know what you're doing, use NeuralNet instead


Constructor & Destructor Documentation

neuralpp::Synapsis::Synapsis (  )  [inline]

Empty constructor (it does nothing).

neuralpp::Synapsis::Synapsis ( Neuron i,
Neuron o,
double(*)(double)  a 
)

Constructor.

Parameters:
i Input neuron
o Output neuron
a Activation function

neuralpp::Synapsis::Synapsis ( Neuron i,
Neuron o,
double  w,
double(*)(double)  a 
)

Constructor.

Parameters:
i Input neuron
o Output neuron
w Weight for the synapsis (default: random)
a Activation function


Member Function Documentation

Neuron* neuralpp::Synapsis::getIn (  )  const

Returns:
Reference to input neuron of the synapsis

Neuron* neuralpp::Synapsis::getOut (  )  const

Returns:
Reference to output neuron of the synapsis

void neuralpp::Synapsis::setWeight ( double  w  )  throw (InvalidSynapticalWeightException)

Set the weight of the synapsis.

Parameters:
w Weight to be set

void neuralpp::Synapsis::setDelta ( double  d  )  throw (InvalidSynapticalWeightException)

It sets the delta (how much to change the weight after an update) of the synapsis.

Parameters:
d Delta to be set

double neuralpp::Synapsis::getWeight (  )  const

Return the weight of the synapsis.

Returns:
Weight of the synapsis

double neuralpp::Synapsis::getDelta (  )  const

Return the delta of the synapsis.

Returns:
Delta of the synapsis

double neuralpp::Synapsis::getPrevDelta (  )  const

Get the delta of the synapsis at the previous iteration.

Returns:
The previous delta

double neuralpp::Synapsis::momentum ( int  N,
int  x 
) const

Get the inertial momentum of a synapsis.

This value is inversely proportional to the number of steps done in the learning phase (quite high at the beginning, decreasing to zero towards the end of the learning algorithm), and is needed to avoid strong oscillations in output values at the beginning, caused by the random values assigned to the synaptical weights

Parameters:
N The number of iterations the network must have to adjust the output values
x The number of iterations already taken
Returns:
The inertial momentum of the synapsis


Member Data Documentation

double neuralpp::Synapsis::delta [private]

double neuralpp::Synapsis::weight [private]

double(* neuralpp::Synapsis::actv_f)(double) [private]


The documentation for this class was generated from the following file:

Generated on Fri Sep 4 11:25:49 2009 for Neural++ by  doxygen 1.5.6