mimas::nn_mlp_tool Class Reference

Multi-layered perceptron (MLP) tool. More...

#include <nn_mlp_tool.h>

Inheritance diagram for mimas::nn_mlp_tool:

Inheritance graph
[legend]
Collaboration diagram for mimas::nn_mlp_tool:

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::numeric::ublas::matrix<
double
Matrix
typedef boost::numeric::ublas::vector<
double
Vector

Public Member Functions

 nn_mlp_tool (void)
 constructor
 ~nn_mlp_tool (void)
 destructor
void init (int nodes,...) throw (mimasexception)
 initialise network with number of nodes in each layer. List must be NULL terminated!
void clear (void)
 delete the whole network
void showConfig (void)
 show network configuration
Matrix feedForward (Matrix &pat) throw (mimasexception)
 feedforward patterns and return a matrix containing the results.
void save (const char *fn) throw (mimasexception)
 save neural network weights to a file. Note that transfer function information are not saved!
void load (const char *fn) throw (mimasexception)
 load neural network from a file. Note that transfer function information are not loaded!
void setIterations (int i) throw (mimasexception)
 set number of iterations to train for
int getIterations (void)
 get number of iterations to train for
Matrix trainOnline (Matrix &pat, double learningRate=0.3, double momentum=0.05, double weightDecay=0.0) throw (mimasexception)
 online training of network on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.
Matrix trainBatch (Matrix &pat, double learningRate=0.3, double momentum=0.05, double weightDecay=0.0) throw (mimasexception)
 batch training of network on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.
Matrix trainQprop (Matrix &pat, double learningRate=0.0005, double momentum=0.05, double maxFactor=2.0) throw (mimasexception)
 batch training using Quickprop on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.
Matrix trainRprop (Matrix &pat, double etapos=1.2, double etaneg=0.5) throw (mimasexception)
 batch training using RProp on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.
void setTransferFuncLayer (ptrToFuncType newfunc, int layer) throw (mimasexception)
 set transfer function for layer. Note that first hidden layer is layer 2. Must be set together with setTransferFuncDerivLayer()
void setTransferFuncDerivLayer (ptrToFuncType newfunc, int layer) throw (mimasexception)
 set derivative of transfer function for layer. Note that first hidden layer is layer 2. Must be set together with setTransferFuncLayer()
virtual double transferFunc (double val)
 a transfer function that is overwritable by the user
virtual double transferFuncDeriv (double val)
 the derivative of a transfer function that is overwritable by the user
double transferFuncTanh (double val)
 the hyperbolic tangent transfer function
double transferFuncDerivTanh (double val)
 the derivative of hyperbolic tangent the transfer function
double transferFuncLinear (double val)
 the linear transfer function
double transferFuncDerivLinear (double val)
 the derivative of linear the transfer function
void setDebug (bool val)
 set/unset debugging flag. When set, training informaiton will be displayed

Detailed Description

Multi-layered perceptron (MLP) tool.

Author:
Bala Amavasai (bala@amavasai.org)
Date:
Tue Sep 24 13:19:08 BST 2002
Header
/cvs/mimas2/include/nn_mlp_tool.h,v 1.1.1.1 2005/08/09 15:37:45 engmb Exp

Definition at line 28 of file nn_mlp_tool.h.


Member Typedef Documentation

typedef boost::numeric::ublas::matrix< double > mimas::nn_mlp_tool::Matrix

Definition at line 31 of file nn_mlp_tool.h.

typedef boost::numeric::ublas::vector< double > mimas::nn_mlp_tool::Vector

Definition at line 32 of file nn_mlp_tool.h.


Constructor & Destructor Documentation

mimas::nn_mlp_tool::nn_mlp_tool ( void   ) 

constructor

mimas::nn_mlp_tool::~nn_mlp_tool ( void   ) 

destructor


Member Function Documentation

void mimas::nn_mlp_tool::init ( int  nodes,
  ... 
) throw (mimasexception)

initialise network with number of nodes in each layer. List must be NULL terminated!

void mimas::nn_mlp_tool::clear ( void   ) 

delete the whole network

void mimas::nn_mlp_tool::showConfig ( void   ) 

show network configuration

Matrix mimas::nn_mlp_tool::feedForward ( Matrix pat  )  throw (mimasexception)

feedforward patterns and return a matrix containing the results.

void mimas::nn_mlp_tool::save ( const char *  fn  )  throw (mimasexception)

save neural network weights to a file. Note that transfer function information are not saved!

void mimas::nn_mlp_tool::load ( const char *  fn  )  throw (mimasexception)

load neural network from a file. Note that transfer function information are not loaded!

void mimas::nn_mlp_tool::setIterations ( int  i  )  throw (mimasexception)

set number of iterations to train for

int mimas::nn_mlp_tool::getIterations ( void   ) 

get number of iterations to train for

Matrix mimas::nn_mlp_tool::trainOnline ( Matrix pat,
double  learningRate = 0.3,
double  momentum = 0.05,
double  weightDecay = 0.0 
) throw (mimasexception)

online training of network on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.

Matrix mimas::nn_mlp_tool::trainBatch ( Matrix pat,
double  learningRate = 0.3,
double  momentum = 0.05,
double  weightDecay = 0.0 
) throw (mimasexception)

batch training of network on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.

Matrix mimas::nn_mlp_tool::trainQprop ( Matrix pat,
double  learningRate = 0.0005,
double  momentum = 0.05,
double  maxFactor = 2.0 
) throw (mimasexception)

batch training using Quickprop on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.

Matrix mimas::nn_mlp_tool::trainRprop ( Matrix pat,
double  etapos = 1.2,
double  etaneg = 0.5 
) throw (mimasexception)

batch training using RProp on input/output dataset pat. Note that the number of columns that are the input patters and target patters are determined by the number of inputs and outputs of the network during the init() call. Returns 2-column matrix of sum-squared-error (SSE) values.

void mimas::nn_mlp_tool::setTransferFuncLayer ( ptrToFuncType  newfunc,
int  layer 
) throw (mimasexception)

set transfer function for layer. Note that first hidden layer is layer 2. Must be set together with setTransferFuncDerivLayer()

void mimas::nn_mlp_tool::setTransferFuncDerivLayer ( ptrToFuncType  newfunc,
int  layer 
) throw (mimasexception)

set derivative of transfer function for layer. Note that first hidden layer is layer 2. Must be set together with setTransferFuncLayer()

virtual double mimas::nn_mlp_tool::transferFunc ( double  val  )  [virtual]

a transfer function that is overwritable by the user

virtual double mimas::nn_mlp_tool::transferFuncDeriv ( double  val  )  [virtual]

the derivative of a transfer function that is overwritable by the user

double mimas::nn_mlp_tool::transferFuncTanh ( double  val  ) 

the hyperbolic tangent transfer function

double mimas::nn_mlp_tool::transferFuncDerivTanh ( double  val  ) 

the derivative of hyperbolic tangent the transfer function

double mimas::nn_mlp_tool::transferFuncLinear ( double  val  ) 

the linear transfer function

double mimas::nn_mlp_tool::transferFuncDerivLinear ( double  val  ) 

the derivative of linear the transfer function

void mimas::nn_mlp_tool::setDebug ( bool  val  ) 

set/unset debugging flag. When set, training informaiton will be displayed


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:35 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...