org.joone.engine.listeners
Class ErrorBasedTerminator

java.lang.Object
  extended by org.joone.util.MonitorPlugin
      extended by org.joone.engine.listeners.ErrorBasedTerminator
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, NeuralNetListener

public class ErrorBasedTerminator
extends MonitorPlugin

Stops a network whenever the training error of the network falls below a certain value.

Author:
Boris Jansen
See Also:
Serialized Form

Constructor Summary
ErrorBasedTerminator()
          Creates a new instance of ErrorBasedTerminator
ErrorBasedTerminator(double anErrorLevel)
          Creates a new instance of ErrorBasedTerminator
 
Method Summary
 double getErrorLevel()
          Gets the error level.
 int getStoppedCycle()
          Gets the cycle the network was stopped.
 boolean isStopRequestPerformed()
          Checks if this object requested / stopped the neural network.
protected  void manageCycle(Monitor mon)
           
protected  void manageError(Monitor mon)
           
protected  void manageStart(Monitor mon)
           
protected  void manageStop(Monitor mon)
           
protected  void manageStopError(Monitor mon, java.lang.String msgErr)
           
 void setErrorLevel(double anErrorLevel)
          Sets the error level.
 
Methods inherited from class org.joone.util.MonitorPlugin
cicleTerminated, errorChanged, getName, getNeuralNet, getRate, netStarted, netStopped, netStoppedError, setName, setNeuralNet, setRate, toBeManaged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorBasedTerminator

public ErrorBasedTerminator()
Creates a new instance of ErrorBasedTerminator


ErrorBasedTerminator

public ErrorBasedTerminator(double anErrorLevel)
Creates a new instance of ErrorBasedTerminator

Parameters:
anErrorLevel - the error level. A network having a training error equal to or below this level will be stopped.
Method Detail

setErrorLevel

public void setErrorLevel(double anErrorLevel)
Sets the error level. A network having a training error equal to or below this level will be stopped.

Parameters:
anErrorLevel - the error level to set.

getErrorLevel

public double getErrorLevel()
Gets the error level.

Returns:
the error level.

manageStop

protected void manageStop(Monitor mon)
Specified by:
manageStop in class MonitorPlugin

manageCycle

protected void manageCycle(Monitor mon)
Specified by:
manageCycle in class MonitorPlugin

manageStart

protected void manageStart(Monitor mon)
Specified by:
manageStart in class MonitorPlugin

manageError

protected void manageError(Monitor mon)
Specified by:
manageError in class MonitorPlugin

manageStopError

protected void manageStopError(Monitor mon,
                               java.lang.String msgErr)
Specified by:
manageStopError in class MonitorPlugin

getStoppedCycle

public int getStoppedCycle()
Gets the cycle the network was stopped.

Returns:
the cycle the network was stopped or -1 if the network hasn't been stopped since it is (re)started.

isStopRequestPerformed

public boolean isStopRequestPerformed()
Checks if this object requested / stopped the neural network.

Returns:
true if this object requested the stop of the network since it has been started, false otherwise.


Submit Feedback to pmarrone@users.sourceforge.net