biopython v1.71.0 Bio.NeuralNetwork.BackPropagation.Layer.OutputLayer

Initialize the Output Layer.

Arguments:

  • num_nodes — The number of nodes in this layer. This corresponds to the number of outputs in the neural network.
  • activation — The transformation function used to transform predicted values.

Link to this section Summary

Functions

Calculate the backpropagation error at a given node

Return the error value at a particular node

Update the value of output nodes from the previous layers

Link to this section Functions

Link to this function backpropagate()

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:

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

Return the error value at a particular node.

Update the value of output nodes from the previous layers.

Arguments:

  • previous_layer — The hidden layer preceding this.