Class Synapse

java.lang.Object
  extended bySynapse
Direct Known Subclasses:
ContextSynapse

public class Synapse
extends Object

The Synapse class is used to connect Neurons together. Synapses are created with adjustable random weights.

Author:
Raymond McBride
See Also:
ContextSynapse

Constructor Summary
Synapse(Neuron inputNeuron, Neuron outputNeuron)
          This constructor for the Synapse connects two Neurons together, and sets it's weight to a random value
 
Method Summary
 void adjustWeight()
          Adjusts the weight
 void calculateWeightChange(double learningRate, double momentum, double errorTerm)
          Calculates the weight change
 void calculateWeightChange(double learningRate, double momentum, double errorTerm, int delays)
          Calculates the average weight change for use with time delays
 double getWeight()
          Gets the Synapse weight
protected  void setWeight(int newWeight)
          Sets the Synapse weight
 void transferValue()
          Transfers a weighted value from the input Neuron to the output Neuron
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Synapse

public Synapse(Neuron inputNeuron,
               Neuron outputNeuron)
This constructor for the Synapse connects two Neurons together, and sets it's weight to a random value

Parameters:
inputNeuron - The input Neuron
outputNeuron - The output Neuron
Method Detail

getWeight

public double getWeight()
Gets the Synapse weight

Returns:
The weight

setWeight

protected void setWeight(int newWeight)
Sets the Synapse weight

Parameters:
newWeight - The new weight

calculateWeightChange

public void calculateWeightChange(double learningRate,
                                  double momentum,
                                  double errorTerm)
Calculates the weight change


calculateWeightChange

public void calculateWeightChange(double learningRate,
                                  double momentum,
                                  double errorTerm,
                                  int delays)
Calculates the average weight change for use with time delays


adjustWeight

public void adjustWeight()
Adjusts the weight


transferValue

public void transferValue()
Transfers a weighted value from the input Neuron to the output Neuron



Copyright © 2004 Raymond McBride. All Rights Reserved.