NeuralNetwork Class Reference
[Neural Network filtering]

#include <NeuralNetwork.h>

Inheritance diagram for NeuralNetwork:

Inheritance graph
[legend]

List of all members.

Public Types

typedef std::vector
< boost::shared_ptr
< GeneralNeuron > > 
tNeuralLayer
typedef std::vector< tNeuralLayertNeuralArray
typedef std::vector
< SigmoidalNeuron::tneurontype
ttypeVector
typedef std::vector< ttypeVectorttypeArray

Public Member Functions

void SetAlpha (const double a)
 Set the momentum multiplier.
void SetMu (const double m)
 Set the adaptation stepsize.
void SetLayers (ttypeArray typeArray, bool cachedoutput=false)
 Configure the layers of the network according to the types in typeArray.
void InitWeights (const double MaxWeight, const double MaxBias)
 Initialize the weights with random values with the specified maxima.
void PrintTopology (std::string filename)
 Print the topology and weights of the network for plotting with the dot program.
virtual void PrintWeights (std::ostream &output)
 Print the weights of the network to the specified output stream.
virtual const gplib::rvec & GetWeightsAsVector ()
 Return the network weights as a single vector.
virtual void AdaptFilter (const gplib::rvec &Input, const gplib::rvec &Desired)
 Adapt the Filter with the current input and desired.
virtual void CalcOutput (const gplib::rvec &Input, gplib::rvec &Output)
 Calculate the output with the given input.
 NeuralNetwork (const int inputsize, const int outputsize)
 The minium values for the network are the length of the input and output.
 NeuralNetwork (const int inputsize, const int outputsize, const double mu_, const ttypeArray &Layerssetup, const double maxinit, bool cachedoutput=false)
 Extended constructor with most of the necessary values.
virtual ~NeuralNetwork ()


Detailed Description

The class NeuralNetwork manages the network output calculation, neuron storage and weight adaptation Derived from AdaptiveFilter so we can use the Filter functionality

Definition at line 16 of file NeuralNetwork.h.


Member Typedef Documentation

Definition at line 19 of file NeuralNetwork.h.

typedef std::vector<boost::shared_ptr<GeneralNeuron> > NeuralNetwork::tNeuralLayer

Definition at line 18 of file NeuralNetwork.h.

typedef std::vector<ttypeVector > NeuralNetwork::ttypeArray

Definition at line 21 of file NeuralNetwork.h.

Definition at line 20 of file NeuralNetwork.h.


Constructor & Destructor Documentation

NeuralNetwork::NeuralNetwork ( const int  inputsize,
const int  outputsize 
)

The minium values for the network are the length of the input and output.

Definition at line 9 of file NeuralNetwork.cpp.

NeuralNetwork::NeuralNetwork ( const int  inputsize,
const int  outputsize,
const double  mu_,
const ttypeArray Layerssetup,
const double  maxinit,
bool  cachedoutput = false 
)

Extended constructor with most of the necessary values.

Definition at line 18 of file NeuralNetwork.cpp.

References InitWeights(), and SetLayers().

NeuralNetwork::~NeuralNetwork (  )  [virtual]

Definition at line 31 of file NeuralNetwork.cpp.


Member Function Documentation

void NeuralNetwork::AdaptFilter ( const gplib::rvec &  Input,
const gplib::rvec &  Desired 
) [virtual]

Adapt the Filter with the current input and desired.

Implements AdaptiveFilter.

Definition at line 34 of file NeuralNetwork.cpp.

References AdaptiveFilter::GetFilterOutput(), and AdaptiveFilter::SetEpsilon().

Referenced by main().

void NeuralNetwork::CalcOutput ( const gplib::rvec &  Input,
gplib::rvec &  Output 
) [virtual]

Calculate the output with the given input.

Implements AdaptiveFilter.

Definition at line 43 of file NeuralNetwork.cpp.

References AdaptiveFilter::SetOutput().

const gplib::rvec & NeuralNetwork::GetWeightsAsVector (  )  [virtual]

Return the network weights as a single vector.

Implements AdaptiveFilter.

Definition at line 55 of file NeuralNetwork.cpp.

References size.

Referenced by PrintTopology().

void NeuralNetwork::InitWeights ( const double  MaxWeight,
const double  MaxBias 
)

Initialize the weights with random values with the specified maxima.

Definition at line 117 of file NeuralNetwork.cpp.

References UniformRNG::GetNumber().

Referenced by main(), and NeuralNetwork().

void NeuralNetwork::PrintTopology ( std::string  filename  ) 

Print the topology and weights of the network for plotting with the dot program.

Definition at line 212 of file NeuralNetwork.cpp.

References GetWeightsAsVector(), and size.

Referenced by main().

void NeuralNetwork::PrintWeights ( std::ostream &  output  )  [virtual]

Print the weights of the network to the specified output stream.

Implements AdaptiveFilter.

Definition at line 200 of file NeuralNetwork.cpp.

Referenced by main().

void NeuralNetwork::SetAlpha ( const double  a  )  [inline]

Set the momentum multiplier.

Definition at line 43 of file NeuralNetwork.h.

Referenced by main().

void NeuralNetwork::SetLayers ( ttypeArray  typeArray,
bool  cachedoutput = false 
)

Configure the layers of the network according to the types in typeArray.

Definition at line 78 of file NeuralNetwork.cpp.

Referenced by main(), and NeuralNetwork().

void NeuralNetwork::SetMu ( const double  m  )  [inline]

Set the adaptation stepsize.

Definition at line 45 of file NeuralNetwork.h.


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

Generated on Tue Aug 4 16:04:21 2009 for GPLIB++ by  doxygen 1.5.8