Package Bio :: Package NeuralNetwork :: Package BackPropagation :: Module Network :: Class BasicNetwork
[hide private]
[frames] | no frames]

Class BasicNetwork

source code

object --+
         |
        BasicNetwork

Represent a Basic Neural Network with three layers.

This deals with a Neural Network containing three layers:

o Input Layer

o Hidden Layer

o Output Layer

Instance Methods [hide private]
 
__init__(self, input_layer, hidden_layer, output_layer)
Initialize the network with the three layers.
source code
 
train(self, training_examples, validation_examples, stopping_criteria, learning_rate, momentum)
Train the neural network to recognize particular examples.
source code
 
predict(self, inputs)
Predict outputs from the neural network with the given inputs.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, input_layer, hidden_layer, output_layer)
(Constructor)

source code 
Initialize the network with the three layers.
        

Overrides: object.__init__

train(self, training_examples, validation_examples, stopping_criteria, learning_rate, momentum)

source code 
Train the neural network to recognize particular examples.

Arguments:

o training_examples -- A list of TrainingExample classes that will
be used to train the network.

o validation_examples -- A list of TrainingExample classes that
are used to validate the network as it is trained. These examples
are not used to train so the provide an independent method of
checking how the training is doing. Normally, when the error
from these examples starts to rise, then it's time to stop
training.

o stopping_criteria -- A function, that when passed the number of
iterations, the training error, and the validation error, will
determine when to stop learning.

o learning_rate -- The learning rate of the neural network.

o momentum -- The momentum of the NN, which describes how much
of the prevoious weight change to use.

predict(self, inputs)

source code 
Predict outputs from the neural network with the given inputs.

This uses the current neural network to predict outputs, no
training of the neural network is done here.