MSERBFNet Class Reference

Offers the functions to create and to work with radial basis function networks and to train it with the mean squared error. This combination provides more computational efficiency compared to using the class MeanSquaredError. More...

#include <MSERBFNet.h>

Inheritance diagram for MSERBFNet:
RBFNet Model

List of all members.

Public Member Functions

 MSERBFNet (unsigned numInput, unsigned numOutput, unsigned numHidden)
 Creates a new Radial Basis Function Network (RBFN) with mean squared error measuring.
 MSERBFNet (const std::string &filename)
 Creates a Radial Basis Function Network by reading information from file "filename".
 MSERBFNet (unsigned numInput, unsigned numOutput, unsigned numHidden, const Array< double > &_m, const Array< double > &_A, const Array< double > &_b, const Array< double > &_v)
double error (Model &model, const Array< double > &input, const Array< double > &target)
 Returns the mean squared error of the Radial Basis Function Network.
double errorDerivative (Model &model, const Array< double > &input, const Array< double > &target, Array< double > &derivative)
 Calculates the derivative of the error $E$ with respect to the parameters of the network. Additionally, the error itself is returned.

Detailed Description

Offers the functions to create and to work with radial basis function networks and to train it with the mean squared error. This combination provides more computational efficiency compared to using the class MeanSquaredError.

Together with an error measure and an optimization algorithm class you can use this radial basis function network class to produce your own optimization tool. Radial Basis Function networks are especially used for classification tasks. For this purpose the class of models contains, besides the number of hidden neurons $nHidden$, 4 different kinds of parameters: the centers of the hidden neurons $\vec{m}_j=(m_{j1},\ldots,m_{jn})$, the standard deviations of the hidden neurons $\vec{\sigma}_j=(\sigma_{j1},\ldots,\sigma_{jn})$, the weights of the connections between the hidden neuron with index $j$ and output neuron with index $k$ and the bias $b_k$ of the output neuron with index $k$. The output neuron with index $k$ yields the following output, assuming a $nInput$-dimensional input vector $\vec{x}$:

\[ y_k = b_k + \sum_{j=1}^{nHidden} \exp\left[ -\frac{1}{2}\sum_{i=1}^{nInput} \frac{\left(x_i-m_{ji}\right)2}{\sigma_{ji}}\right] \]

The mean squared error is used as the error measure.

\[ E = \frac{1}{P\cdot nOutput}\sum_{p=1}^{P}\sum_{k=1}^{nOutput} \left(y_k^{(p)}-t_k^{(p)}\right)2 \]

Here, $P$ denotes the number of different patterns, $y_k^{(p)}$ and $t_k^{(p)}$ the output and target value belonging to the $p^{th}$ input pattern and $nOutput$ the number of output neurons.

Please follow the link to view the source code of this example, that shows you, how you can construct your own radial basis function neural network, completely with one error measure for training and another for monitoring and an optimization algorithm. The example itself can be executed in the example directory of package ReClaM.

Author:
M. Hüsken
Date:
2001
Changes:
none
Status:
stable

Definition at line 114 of file MSERBFNet.h.


Constructor & Destructor Documentation

MSERBFNet::MSERBFNet ( unsigned  numInput,
unsigned  numOutput,
unsigned  numHidden 
) [inline]

Creates a new Radial Basis Function Network (RBFN) with mean squared error measuring.

This method creates a Radial Basis Function Network with numInput input neurons, numOutput output neurons and numHidden hidden neurons.

Parameters:
numInput Number of input neurons, equal to dimensionality of input space.
numOutput Number of output neurons, equal to dimensionality of output space.
numHidden Number of hidden neurons.
Returns:
None.
Author:
M. Hüsken
Date:
2001
Changes
none
Status
none

Definition at line 146 of file MSERBFNet.h.

MSERBFNet::MSERBFNet ( const std::string &  filename  )  [inline]

Creates a Radial Basis Function Network by reading information from file "filename".

Constructor 2

This method creates a Radial Basis Function Network (RBFN) which is definded in the file filename.

Parameters:
filename Name of the file the RBFN definition is read from.
Returns:
None.
Author:
L. Arnold
Date:
2002
Changes
none
Status
stable

Definition at line 176 of file MSERBFNet.h.

MSERBFNet::MSERBFNet ( unsigned  numInput,
unsigned  numOutput,
unsigned  numHidden,
const Array< double > &  _m,
const Array< double > &  _A,
const Array< double > &  _b,
const Array< double > &  _v 
) [inline]

Constructor 3

This method creates a Radial Basis Function Network (RBFN) with numInput input neurons, numOutput output neurons and numHidden hidden neurons and initializes the parameters.

Parameters:
numInput Number of input neurons, equal to dimensionality of input space.
numOutput Number of output neurons, equal to dimensionality of output space.
numHidden Number of hidden neurons.
_m centers
_A output weights
_b biases
_v variances
Returns:
None.
Author:
C. Igel
Date:
2003
Changes
none
Status
stable

Definition at line 217 of file MSERBFNet.h.


Member Function Documentation

double MSERBFNet::error ( Model model,
const Array< double > &  input,
const Array< double > &  target 
) [inline]

Returns the mean squared error of the Radial Basis Function Network.

This method calculates the error of the RBFN. The output of the model for the input $input$, given as $model(input)$is compared with the $target$ values. Given a Radial Basis Function network with $N$ output neurons and $P$ input patterns as stimulus, the error is calculated as:

$ E = \frac{1}{P\cdot N}\sum_{p=1}^{P}\sum_{i=1}^{N} \left(model(input)^{(p)}_i-target_i^{(p)}\right)2 $

Parameters:
input Vector of input patterns.
target Vector of target values.
Returns:
None.
Author:
C. Igel
Date:
1999
Changes
none
Status
stable

Definition at line 259 of file MSERBFNet.h.

References Model::getParameter(), Model::getParameterDimension(), i, and Model::outputDimension.

double MSERBFNet::errorDerivative ( Model model,
const Array< double > &  input,
const Array< double > &  target,
Array< double > &  derivative 
) [inline]

Calculates the derivative of the error $E$ with respect to the parameters of the network. Additionally, the error itself is returned.

Calculates the derivates of the mean squared error $E$ (see error) with respect to the parameters ModelInterface::w and stores the result in ModelInterface::dedw.

As a byproduct of the calculation of the derivative one gets the the mean squared error $E$ itself very efficiently. Therefore, the method error returns this value. This additional effect can be switched of by means of the third parameter (returnError = false).

Parameters:
input Vector of input patterns.
target Vector of target values.
returnError Determines whether or not to calculate the error itself. By default the error is calculated.
Returns:
The error $E$ if returnError is set to "true", otherwise "-1" is returned.
Author:
M. Kreutz
Date:
1999
Changes
none
Status
stable

Definition at line 303 of file MSERBFNet.h.

References Model::getParameter(), Model::getParameterDimension(), i, and Model::outputDimension.


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