Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

NN Class Reference

Multilayer perceptron Class. More...

#include <nn.h>

Inheritance diagram for NN:

Serializable List of all members.

Public Methods

void calcresSpecial (float *inp)
void printThresholds ()
void printWeights ()
void printActivations ()
void saveNetwork (FILE *f)
void Serialize (FILE *f)
void Deserialize (FILE *f)

Public Attributes

int nlevels
int nnodes [MAXLEVEL]
float wm [MAXLEVEL-1][MAXNODES][MAXNODES]
float thresh [MAXLEVEL-1][MAXNODES]
float activ [MAXLEVEL][MAXNODES]
int nparams

Detailed Description

Multilayer perceptron Class.

This class provides an implementation of a multilayer perceptron. @TODO: More activation functions / a mechanism for different activation functions

Author:
soysal
Version:
0.1


Member Function Documentation

void NN::calcresSpecial float *    inp
 

Similar to calcres this function calculates the activations on the network. BUT uses special rules to evaluate network. First the network is assumed to be single layer. And also two specific inputs and two specific outputs are identified. Inputs and outputs with smallest two indices are these special inputs and outputs. Special input are only connected to special outputs. Also the weights from first input is assured to be positive and positive/negative to outputs from second input respectively. ( [0,0]=+ [0,1]=+ [1,0]=+ [1,1]=-) Result is evaluated on this basis.

Parameters:
inp  input to be given to MLP. it is expected to be a vector of size 'nnodes[0]'

void NN::printActivations  
 

Prints activations at each level

void NN::printThresholds  
 

Prints thresholds

void NN::printWeights  
 

Prints weights

void NN::saveNetwork FILE *    f
 

Saves network to 'f' in text format. 'f' is assumed to be open beforehand. 'f' is not closed afterwards.

Parameters:
f  an open text file that is writable


Member Data Documentation

float NN::activ[MAXLEVEL][MAXNODES]
 

activations at each level. First index is for level 'l' and second index is for nodes at level 'l'

int NN::nlevels
 

number of levels in the MLP

int NN::nnodes[MAXLEVEL]
 

number of nodes in each level

int NN::nparams
 

Calculates the activations on the network

Parameters:
inp  input to be given to MLP. it is expected to be a vector of size 'nnodes[0]'

float NN::thresh[MAXLEVEL-1][MAXNODES]
 

threshold matrix first index is for level 'l' and second index is for nodes at level 'l'

float NN::wm[MAXLEVEL-1][MAXNODES][MAXNODES]
 

weight matrix that holds weights first index is for level 'l' other indices stand for i and j respectively for the weights between nodes i and j in level 'l'


The documentation for this class was generated from the following file:
Generated on Thu Feb 12 18:42:57 2004 for ParallelizedEvolutionSystem by doxygen1.2.18