com.penguinwerks.jodene.listeners
Class StopOnClassificationListener

java.lang.Object
  extended bycom.penguinwerks.jodene.listeners.StopOnClassificationListener
All Implemented Interfaces:
EpochEventListener

public class StopOnClassificationListener
extends java.lang.Object
implements EpochEventListener

Stops training when the max number of incorrect classifications is reached.

Author:
Paul Hoehne

Constructor Summary
StopOnClassificationListener()
          Creates a new instance of StopOnCassificationListener
StopOnClassificationListener(double stopValue)
          Creates a new listener.
 
Method Summary
 void epochEnd(TrainingEpochEvent evt)
          Implements epoch end listeners.
 java.lang.String getErrorName()
          The name of this error listener.
 double getStopValue()
          Returns the number of missclassifications that will stop training.
 void setErrorName(java.lang.String name)
          Sets the error name for the listener.
 void setStopValue(double val)
          Sets the number of missclassifications that stop training.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StopOnClassificationListener

public StopOnClassificationListener()
Creates a new instance of StopOnCassificationListener


StopOnClassificationListener

public StopOnClassificationListener(double stopValue)
Creates a new listener.

Parameters:
stopValue - The value that stops training.
Method Detail

epochEnd

public void epochEnd(TrainingEpochEvent evt)
Implements epoch end listeners.

Specified by:
epochEnd in interface EpochEventListener
Parameters:
evt - The epoch end event.

setErrorName

public void setErrorName(java.lang.String name)
Sets the error name for the listener.

Parameters:
name - The error name.

getErrorName

public java.lang.String getErrorName()
The name of this error listener.

Returns:
Returns the error name for this listener.

getStopValue

public double getStopValue()
Returns the number of missclassifications that will stop training.

Returns:
The number of misclassifications.

setStopValue

public void setStopValue(double val)
Sets the number of missclassifications that stop training.

Parameters:
val - The number of classifications.