org.joone.engine.learning
Class TeacherSynapse

java.lang.Object
  extended by org.joone.engine.Synapse
      extended by org.joone.engine.learning.AbstractTeacherSynapse
          extended by org.joone.engine.learning.TeacherSynapse
All Implemented Interfaces:
java.io.Serializable, InputPatternListener, Learnable, LearnableSynapse, NeuralElement, OutputPatternListener, Inspectable
Direct Known Subclasses:
FahlmanTeacherSynapse

public class TeacherSynapse
extends AbstractTeacherSynapse

Final element of a neural network; it permits to calculate both the error of the last training cycle and the vector containing the error pattern to apply to the net to calculate the backprop algorithm.

See Also:
Serialized Form

Field Summary
protected  double GlobalError
          The error being calculated for the current epoch.
protected static ILogger log
          Logger
 
Fields inherited from class org.joone.engine.learning.AbstractTeacherSynapse
currEpoch, desired, error, lastErrorPatternReady, net
 
Fields inherited from class org.joone.engine.Synapse
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, outs, revLock
 
Constructor Summary
TeacherSynapse()
           
 
Method Summary
 double calculateError(double aDesired, double anOutput, int anIndex)
          Calculates the error to be backpropaged for a single output neuron.
 double calculateGlobalError()
          This method is called after an epoch finished and the global error should be calculated.
 void fwdPut(Pattern pattern)
          Method to put a pattern forward to the next layer
 
Methods inherited from class org.joone.engine.learning.AbstractTeacherSynapse
backward, check, constructErrorPattern, epochFinished, forward, fwdGet, getDesired, getLastErrorPattern, getSeenPatterns, incSeenPatterns, init, isFirstTime, isLastErrorPatternReady, netStoppedError, pushError, readResolve, reset, resetInput, revGet, revPut, setArrays, setDesired, setDimensions, setFirstTime, setInputDimension, setMonitor, setSeenPatterns, stopTheNet
 
Methods inherited from class org.joone.engine.Synapse
addNoise, canCountSteps, fwdPattern_consume, fwdPattern_produce, getCount, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getSynapseNameSafely, getWeights, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, revPattern_consume, revPattern_produce, setEnabled, setIgnoreBefore, setInputFull, setLearningRate, setLoopBack, setMomentum, setName, setOutputDimension, setOutputFull, setWeights, warnLogger, warnLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final ILogger log
Logger


GlobalError

protected transient double GlobalError
The error being calculated for the current epoch.

Constructor Detail

TeacherSynapse

public TeacherSynapse()
Method Detail

calculateError

public double calculateError(double aDesired,
                             double anOutput,
                             int anIndex)
Description copied from class: AbstractTeacherSynapse
Calculates the error to be backpropaged for a single output neuron. (The function should also update the global error internally).

Specified by:
calculateError in class AbstractTeacherSynapse
Parameters:
aDesired - the desired output
anOutput - the actual output of a single neuron
anIndex - the index of the output neuron
Returns:
the error to be back propagated

calculateGlobalError

public double calculateGlobalError()
Description copied from class: AbstractTeacherSynapse
This method is called after an epoch finished and the global error should be calculated.

Specified by:
calculateGlobalError in class AbstractTeacherSynapse
Returns:
the global error (at the end of an epoch).

fwdPut

public void fwdPut(Pattern pattern)
Description copied from interface: OutputPatternListener
Method to put a pattern forward to the next layer

Specified by:
fwdPut in interface OutputPatternListener
Overrides:
fwdPut in class AbstractTeacherSynapse
Parameters:
pattern - neural.engine.Pattern


Submit Feedback to pmarrone@users.sourceforge.net