GPLIB++
Public Types | Public Member Functions | List of all members
gplib::SigmoidalNeuron Class Reference

SigmoidalNeuron implements the main functionality of neurons in a neural network. More...

#include <SigmoidalNeuron.h>

Inheritance diagram for gplib::SigmoidalNeuron:
Inheritance graph
[legend]

Public Types

enum  tneurontype { bipolar, identity }
 At the moment there are two types of neurons: bipolar and identity, they differ in their activation function. More...
 

Public Member Functions

virtual const std::vector
< double > & 
GetOldDelta ()
 Get the last weight correction for momentum adaptation. More...
 
virtual std::vector< double > & SetOldDelta ()
 
virtual double CalcDeriv (const double input)
 Return the derivative of the activation function. More...
 
virtual double GetNet ()
 Get the raw output of the linear combiner. More...
 
virtual double GetDelta ()
 Get the delta term of the weight correction formula. More...
 
virtual void SetDelta (const double d)
 Set the delta term of the weight correction formula. More...
 
virtual void SetBias (const double b)
 Set the bias of the linear combiner, the following functions are mostly for convenience access. More...
 
virtual double GetBias ()
 Get the bias of the linear combiner. More...
 
virtual const std::vector
< double > & 
GetWeights ()
 Get the weights. More...
 
virtual std::vector< double > & SetWeights ()
 Set the weights. More...
 
virtual const
GeneralLinearCombiner::tinvector
GetInput ()
 Get the input neurons. More...
 
virtual void SetInput (const GeneralLinearCombiner::tinvector &input)
 Set the input neurons. More...
 
virtual void SetType (tneurontype type)
 Set the type of neuron, determines the activation function. More...
 
 SigmoidalNeuron (tneurontype type, bool wantcached=false)
 Construct neuron with a known type. More...
 
virtual ~SigmoidalNeuron ()
 
- Public Member Functions inherited from gplib::GeneralNeuron
double GetOutput ()
 Get the output given the current weights. More...
 
double GetLastOutput ()
 Get the last result from calling GetOutput, needed during adaptation. More...
 
 GeneralNeuron ()
 
virtual ~GeneralNeuron ()
 

Detailed Description

SigmoidalNeuron implements the main functionality of neurons in a neural network.

Definition at line 16 of file SigmoidalNeuron.h.

Member Enumeration Documentation

At the moment there are two types of neurons: bipolar and identity, they differ in their activation function.

Enumerator
bipolar 
identity 

Definition at line 20 of file SigmoidalNeuron.h.

Constructor & Destructor Documentation

gplib::SigmoidalNeuron::SigmoidalNeuron ( tneurontype  type,
bool  wantcached = false 
)
explicit

Construct neuron with a known type.

Definition at line 7 of file SigmoidalNeuron.cpp.

References SetType().

gplib::SigmoidalNeuron::~SigmoidalNeuron ( )
virtual

Definition at line 13 of file SigmoidalNeuron.cpp.

Member Function Documentation

virtual double gplib::SigmoidalNeuron::CalcDeriv ( const double  input)
inlinevirtual

Return the derivative of the activation function.

Implements gplib::GeneralNeuron.

Definition at line 52 of file SigmoidalNeuron.h.

virtual double gplib::SigmoidalNeuron::GetBias ( )
inlinevirtual

Get the bias of the linear combiner.

Implements gplib::GeneralNeuron.

Definition at line 77 of file SigmoidalNeuron.h.

virtual double gplib::SigmoidalNeuron::GetDelta ( )
inlinevirtual

Get the delta term of the weight correction formula.

Implements gplib::GeneralNeuron.

Definition at line 62 of file SigmoidalNeuron.h.

virtual const GeneralLinearCombiner::tinvector& gplib::SigmoidalNeuron::GetInput ( )
inlinevirtual

Get the input neurons.

Implements gplib::GeneralNeuron.

Definition at line 92 of file SigmoidalNeuron.h.

virtual double gplib::SigmoidalNeuron::GetNet ( )
inlinevirtual

Get the raw output of the linear combiner.

Implements gplib::GeneralNeuron.

Definition at line 57 of file SigmoidalNeuron.h.

virtual const std::vector<double>& gplib::SigmoidalNeuron::GetOldDelta ( )
inlinevirtual

Get the last weight correction for momentum adaptation.

Implements gplib::GeneralNeuron.

Definition at line 43 of file SigmoidalNeuron.h.

virtual const std::vector<double>& gplib::SigmoidalNeuron::GetWeights ( )
inlinevirtual

Get the weights.

Implements gplib::GeneralNeuron.

Definition at line 82 of file SigmoidalNeuron.h.

virtual void gplib::SigmoidalNeuron::SetBias ( const double  b)
inlinevirtual

Set the bias of the linear combiner, the following functions are mostly for convenience access.

Implements gplib::GeneralNeuron.

Definition at line 72 of file SigmoidalNeuron.h.

virtual void gplib::SigmoidalNeuron::SetDelta ( const double  d)
inlinevirtual

Set the delta term of the weight correction formula.

Implements gplib::GeneralNeuron.

Definition at line 67 of file SigmoidalNeuron.h.

void gplib::SigmoidalNeuron::SetInput ( const GeneralLinearCombiner::tinvector input)
virtual

Set the input neurons.

Reimplemented from gplib::GeneralNeuron.

Definition at line 24 of file SigmoidalNeuron.cpp.

virtual std::vector<double>& gplib::SigmoidalNeuron::SetOldDelta ( )
inlinevirtual

Implements gplib::GeneralNeuron.

Definition at line 47 of file SigmoidalNeuron.h.

void gplib::SigmoidalNeuron::SetType ( tneurontype  type)
virtual

Set the type of neuron, determines the activation function.

Definition at line 30 of file SigmoidalNeuron.cpp.

References bipolar, and identity.

Referenced by SigmoidalNeuron().

virtual std::vector<double>& gplib::SigmoidalNeuron::SetWeights ( )
inlinevirtual

Set the weights.

Implements gplib::GeneralNeuron.

Definition at line 87 of file SigmoidalNeuron.h.


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