Solution to Adaline Neural Network


To understand Adaline Neural Network, one should first understand what a Neural Network is in this assignment.

Adaline Neural Network (class AdalineNet) is a kind of Neural Network (class NeuralNet) which we built in Assignment  one and two.  A Neural Netwrok is basically a collection of Neuron Layers (class NeuronLayer) linked together by a collection of Link Layers (class LinkLayer).  An Neuron Layer is a collection of Neurons (class Neuron).   A Link Layer is a collection of Links (LinkLayer) with certain connection weights.   What we can do with the Neural Network is to give it some input values, ie. set the values of the Neurons in the input Layer (first NeuronLayer), fire the entire network and get output values from the output Layer (the last Neuron Layer is the output Layer).

Adaline Network is a simple Neural Network.  It only has two Neuron Layers - one input Neuron Layer and one output Neuron Layer.  The output Layer has only one Neuron node.  Adaline Network is also the first Neural Network we built that "learns".  The learning rule is simple: We give it some input values, fire the Network, and compare the output value with the desired value.  If there is any descrepency, the Links in the LinkLayer will adjust their weights until the rate of error is smaller than our tolerance.

From assignment 1 to 3, we learned all the essentials for classes.   We also praticed changing internal data implementation from fixed sized array to dynamic array and to linked list without modifying the public interface.  Finally, we learned about about inheretance.

Following are the files for Adaline Neural Network :

classes header implementation
class Neuron, Link base.h base.cpp
class NeuronLayer, LinkLayer layer.h layer.cpp
class NeuralNet NeuralNet.h NeuralNet.cpp
class AdalineNet AdalineNet.h AdalineNet.cpp
driver   main.cpp

Questions or Comments? Please email me at