Package Bio :: Package NeuralNetwork :: Package BackPropagation :: Module Layer :: Class OutputLayer
[show private | hide private]
[frames | no frames]

Class OutputLayer

AbstractLayer --+
                |
               OutputLayer


Method Summary
  __init__(self, num_nodes, activation)
Initialize the Output Layer.
  backpropagate(self, outputs, learning_rate, momentum)
Calculate the backpropagation error at a given node.
  get_error(self, real_value, node_number)
Return the error value at a particular node.
  set_weight(self, this_node, next_node, value)
Set a weight value from one node to the next.
  update(self, previous_layer)
Update the value of output nodes from the previous layers.
    Inherited from AbstractLayer
  __str__(self)
Debugging output.

Method Details

__init__(self, num_nodes, activation=<function logistic_function at 0xb72fe5a4>)
(Constructor)

Initialize the Output Layer.

Arguments:

o num_nodes -- The number of nodes in this layer. This corresponds to the number of outputs in the neural network.

o activation -- The transformation function used to transform predicted values.
Overrides:
Bio.NeuralNetwork.BackPropagation.Layer.AbstractLayer.__init__

backpropagate(self, outputs, learning_rate, momentum)

Calculate the backpropagation error at a given node.

This calculates the error term using the formula:

p = (z - t) z (1 - z)

where z is the calculated value for the node, and t is the real value.

Arguments:

o outputs - The list of output values we use to calculate the errors in our predictions.

get_error(self, real_value, node_number)

Return the error value at a particular node.

set_weight(self, this_node, next_node, value)

Set a weight value from one node to the next.

If weights are not explicitly set, they will be initialized to random values to start with.
Overrides:
Bio.NeuralNetwork.BackPropagation.Layer.AbstractLayer.set_weight (inherited documentation)

update(self, previous_layer)

Update the value of output nodes from the previous layers.

Arguments:

o previous_layer -- The hidden layer preceeding this.

Generated by Epydoc 2.1 on Thu Mar 31 20:15:48 2005 http://epydoc.sf.net