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 the desired output is 0 - within [0.6, 1] in case the desired output is 1.
More about this criterion can be found at
http://citeseer.ist.psu.edu/fahlman88empirical.html.
| Modifier and Type | Field and Description |
|---|---|
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 ILogger |
log
Logger
|
GlobalErrorcurrEpoch, desired, error, lastErrorPatternReady, net| Constructor and Description |
|---|
FahlmanTeacherSynapse()
Creates a new instance of FahlmanTeacherSynapse
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
calculateGlobalError, fwdPutbackward, 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, stopTheNetaddNoise, 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, warnLoggerpublic static final java.lang.String CRITERION
protected static final ILogger log
public FahlmanTeacherSynapse()
public void setUpperBit(double aValue)
aValue - sets the upper bit to aValue.public double getUpperBit()
public void setLowerBit(double aValue)
aValue - sets the lower bit to aValue.public double getLowerBit()
public void setUpperBitPercentage(double aValue)
aValue - sets the upper bit percentage to aValue.public double getUpperBitPercentage()
public void setLowerBitPercentage(double aValue)
aValue - sets the lower bit percentage to aValue.public double getLowerBitPercentage()
public double calculateError(double aDesired,
double anOutput,
int anIndex)
AbstractTeacherSynapsecalculateError in class TeacherSynapseaDesired - the desired outputanOutput - the actual output of a single neuronanIndex - the index of the output neuronSubmit Feedback to pmarrone@users.sourceforge.net