neuralpp::Synapsis Class Reference

Class for managing synapsis. More...

#include <neural++.hpp>

List of all members.

Public Member Functions

 Synapsis (Neuron *i, Neuron *o, double w, double d)
 Constructor.
 Synapsis (Neuron *i, Neuron *o, double(*a)(double))
 Constructor.
 Synapsis (Neuron *i, Neuron *o, double w, double(*a)(double))
 Constructor.
NeurongetIn ()
NeurongetOut ()
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 ()
 Return the weight of the synapsis.
double getDelta ()
 Return the delta of the synapsis.
double getPrevDelta ()
 Get the delta of the synapsis at the previous iteration.
double momentum (int N, int x)
 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 ( Neuron i,
Neuron o,
double  w,
double  d 
)

Constructor.

Parameters:
i Input neuron
o Output neuron
w Weight for the synapsis
d Delta for the synapsis

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 (  ) 

Returns:
Reference to input neuron of the synapsis

Neuron* neuralpp::Synapsis::getOut (  ) 

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 (  ) 

Return the weight of the synapsis.

Returns:
Weight of the synapsis

double neuralpp::Synapsis::getDelta (  ) 

Return the delta of the synapsis.

Returns:
Delta of the synapsis

double neuralpp::Synapsis::getPrevDelta (  ) 

Get the delta of the synapsis at the previous iteration.

Returns:
The previous delta

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

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 Sat Aug 15 02:56:02 2009 for Neural++ by  doxygen 1.5.6