Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.joone.engine.learning
Class FahlmanTeacherSynapse  view FahlmanTeacherSynapse download FahlmanTeacherSynapse.java

java.lang.Object
  extended byorg.joone.engine.Synapse
      extended byorg.joone.engine.learning.AbstractTeacherSynapse
          extended byorg.joone.engine.learning.TeacherSynapse
              extended byorg.joone.engine.learning.FahlmanTeacherSynapse
All Implemented Interfaces:
java.util.EventListener, org.joone.engine.InputPatternListener, org.joone.inspection.Inspectable, org.joone.engine.Learnable, org.joone.engine.LearnableSynapse, org.joone.engine.NeuralElement, org.joone.engine.NeuralNetListener, org.joone.engine.OutputPatternListener, java.io.Serializable

public class FahlmanTeacherSynapse
extends TeacherSynapse

This class extends the normal Teacher synapse and implements the Fahlman 40-20-40 criterion (the values can be changed). This teacher makes only sense in case of binary outputs.

In case of the default values (40-20-40) and considering [0,1] binary outputs the criterion is fullfilled if for all patterns the output is within [0, 0.4] in case where the desired output is 0 and the output is within [0.6, 1] in case where the desired output is 1.

More obout this criterion can be found at http://citeseer.ist.psu.edu/fahlman88empirical.html.


Field Summary
static java.lang.String CRITERION
          Constant to indicate (key) the parameter for checking (in the monitor object) if the criterion has been forfilled or not.
protected static org.joone.log.ILogger log
          Logger
private  double lowerBit
          The lowerbit value (of the desired output), by default 0.
private  double lowerBitPercentage
          The percentage that is considered as a lowerbit, by default 0.4.
private  double upperBit
          The upperbit value (of the desired output), by default 1.
private  double upperBitPercentage
          The percentage that is considered as a upperbit, by default 0.4.
 
Fields inherited from class org.joone.engine.learning.TeacherSynapse
GlobalError
 
Fields inherited from class org.joone.engine.learning.AbstractTeacherSynapse
desired, error
 
Fields inherited from class org.joone.engine.Synapse
array, b_pattern, bitems, bouts, count, enabled, fwdLock, inps, items, learnable, m_batch, m_pattern, myLearner, notFirstTime, notFirstTimeB, outs, revLock
 
Constructor Summary
FahlmanTeacherSynapse()
          Creates a new instance of FahlmanTeacherSynapse
 
Method Summary
protected  double calculateError(double aDesired, double anOutput, int anIndex)
          Calculates the error to be backpropaged for a single output neuron.
 double getLowerBit()
          Gets the lower bit value.
 double getLowerBitPercentage()
          Gets the lower bit percentage.
 double getUpperBit()
          Gets the upper bit value.
 double getUpperBitPercentage()
          Gets the upper bit percentage.
 void setLowerBit(double aValue)
          Sets the lower bit.
 void setLowerBitPercentage(double aValue)
          Sets the lower bit percentage.
 void setUpperBit(double aValue)
          Sets the upper bit.
 void setUpperBitPercentage(double aValue)
          Sets the upper bit percentage.
 
Methods inherited from class org.joone.engine.learning.TeacherSynapse
calculateGlobalError, fwdPut
 
Methods inherited from class org.joone.engine.learning.AbstractTeacherSynapse
backward, check, cicleTerminated, constructErrorPattern, epochFinished, errorChanged, forward, fwdGet, getDesired, getSeenPatterns, incSeenPatterns, init, isFirstTime, netStarted, netStopped, 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, getFwdLock, getIgnoreBefore, getInputDimension, getLearner, getLearningRate, getMomentum, getMonitor, getName, getOutputDimension, getRevLock, getWeights, initLearner, InspectableTitle, Inspections, isEnabled, isInputFull, isLoopBack, isOutputFull, randomize, setEnabled, setIgnoreBefore, setInputFull, setLearningRate, setLoopBack, setMomentum, setName, setOutputDimension, setOutputFull, setWeights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRITERION

public static final java.lang.String CRITERION
Constant to indicate (key) the parameter for checking (in the monitor object) if the criterion has been forfilled or not.

See Also:
Constant Field Values

log

protected static final org.joone.log.ILogger log
Logger


upperBit

private double upperBit
The upperbit value (of the desired output), by default 1.


lowerBit

private double lowerBit
The lowerbit value (of the desired output), by default 0.


lowerBitPercentage

private double lowerBitPercentage
The percentage that is considered as a lowerbit, by default 0.4. In case of desired output bits {0, 1} any output within [0, 0.4] is considered a lower bit


upperBitPercentage

private double upperBitPercentage
The percentage that is considered as a upperbit, by default 0.4. In case of desired output bits {0, 1} any output within [0.6, 1] is considered a upper bit

Constructor Detail

FahlmanTeacherSynapse

public FahlmanTeacherSynapse()
Creates a new instance of FahlmanTeacherSynapse

Method Detail

setUpperBit

public void setUpperBit(double aValue)
Sets the upper bit.


getUpperBit

public double getUpperBit()
Gets the upper bit value.


setLowerBit

public void setLowerBit(double aValue)
Sets the lower bit.


getLowerBit

public double getLowerBit()
Gets the lower bit value.


setUpperBitPercentage

public void setUpperBitPercentage(double aValue)
Sets the upper bit percentage.


getUpperBitPercentage

public double getUpperBitPercentage()
Gets the upper bit percentage.


setLowerBitPercentage

public void setLowerBitPercentage(double aValue)
Sets the lower bit percentage.


getLowerBitPercentage

public double getLowerBitPercentage()
Gets the lower bit percentage.


calculateError

protected 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).

Overrides:
calculateError in class TeacherSynapse