bodhidharma.classifiers.feedforward_neural_networks
Class OutputNode

java.lang.Object
  extended by bodhidharma.classifiers.feedforward_neural_networks.OutputNode
Direct Known Subclasses:
HiddenNode

public class OutputNode
extends java.lang.Object

Objects of this class represent the outputs of a neural network. OutputNodes can update themselves during learning. Adjustable learning rates and momentums are permitted.The sigmoidal activation funciton is used.

Author:
Cory McKay

Field Summary
protected  double current_value
           
protected  double error_signal
           
protected  double[] input_values
           
 double learning_rate
          The learning rate of the node used during learning
 double momentum
          The momentum co-efficient used during learning
protected  int number_inputs
           
protected  double[] previous_update
           
protected  double[] weights
           
 
Constructor Summary
OutputNode(double n, double alpha, int inputs)
          Instantiate the OutputNode with the given parameters.
 
Method Summary
 void calculate_value()
          Perform calculations to set the current value of the node based on its current inputs and weights
 double get_current_value()
          Get the current value of the node
 double get_error_signal_times_weight(int link_index)
          Returns the error signal times the weight of the link back to the given hidden node Is used by a hidden node to calculate its own error signal update_weights should be called first on each iteration to ensure that error_signal is updated
 double[] get_weight_values()
          Return the weights
 java.lang.String get_weights()
          Return a vertical list of weights
 java.lang.String output_values()
          Returns the current inputs, weights and values of the node Used during debugging
 void set_input(int link, double input)
          Set the current input value of the appropriate link to the given input.
 void set_weight(int link, double input)
          Set the current weight of the appropriate link to the given input.
 void update_weights(double desired_output)
          Update the weights of the node during a training iteration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

learning_rate

public double learning_rate
The learning rate of the node used during learning


momentum

public double momentum
The momentum co-efficient used during learning


number_inputs

protected int number_inputs

input_values

protected double[] input_values

weights

protected double[] weights

current_value

protected double current_value

error_signal

protected double error_signal

previous_update

protected double[] previous_update
Constructor Detail

OutputNode

public OutputNode(double n,
                  double alpha,
                  int inputs)
Instantiate the OutputNode with the given parameters. inputs includes the bias node, which is the last one

Method Detail

set_input

public void set_input(int link,
                      double input)
Set the current input value of the appropriate link to the given input.


set_weight

public void set_weight(int link,
                       double input)
Set the current weight of the appropriate link to the given input.


get_current_value

public double get_current_value()
Get the current value of the node


get_weight_values

public double[] get_weight_values()
Return the weights


get_weights

public java.lang.String get_weights()
Return a vertical list of weights


calculate_value

public void calculate_value()
Perform calculations to set the current value of the node based on its current inputs and weights


update_weights

public void update_weights(double desired_output)
Update the weights of the node during a training iteration


get_error_signal_times_weight

public double get_error_signal_times_weight(int link_index)
Returns the error signal times the weight of the link back to the given hidden node Is used by a hidden node to calculate its own error signal update_weights should be called first on each iteration to ensure that error_signal is updated


output_values

public java.lang.String output_values()
Returns the current inputs, weights and values of the node Used during debugging