Using the classes in your own programs

This section explains, how you can use the neural network classes in your own programs.

While designing the classes, I asked myself, what would be the easiest way to build a neural net? I remembered the neural net lessons, where my professor used to say things like:

"Now we want to build a 3-layered Backpropagation Net with 4 neurons in its input layer and 3 neurons in its output layer. The hidden layer consists of 2 neurons. Each neuron of one layer is connected to all neurons of the following layer..."


While he said this, he drew a sketch of the net on the blackboard in the following way:

1. He drew the neurons of the input layer

2. He drew the neurons of the hidden layer

3. He drew the neurons of the output layer

4. He connected the input neurons with the hidden neurons

5. He connected the hidden neurons with the output neurons

6. He assigned random values to the weights of both weight matrices

7. He wrote down the input and target patterns

8. He demonstrated a few learning cycles of the net


For this procedure was always the same, and only the net structure changed, it seemed to be a possible solution for an implementation. So I came to the conclusion, building a neural net in a program should be done the same way as you would describe it with your own words.


The whole class structure consists of 11 classes, as can be seen in Class Structure/The classes and their relationships, but you actually need to know more about only three of them to get your neural net running.

The classes you explicitely use in your programs are: BackpropagationNet, KohonenFeatureMap, and InputMatrix.

Neural Net Components in an Object Oriented Class Structure