#include <nn.h>
Inheritance diagram for NN:

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 |
This class provides an implementation of a multilayer perceptron. @TODO: More activation functions / a mechanism for different activation functions
|
|
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.
|
|
|
Prints activations at each level |
|
|
Prints thresholds |
|
|
Prints weights |
|
|
Saves network to 'f' in text format. 'f' is assumed to be open beforehand. 'f' is not closed afterwards.
|
|
|
activations at each level. First index is for level 'l' and second index is for nodes at level 'l' |
|
|
number of levels in the MLP |
|
|
number of nodes in each level |
|
|
Calculates the activations on the network
|
|
|
threshold matrix first index is for level 'l' and second index is for nodes at level 'l' |
|
|
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' |
1.2.18