com.penguinwerks.jodene.listeners
Class MaxIterationsListener

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

public class MaxIterationsListener
extends java.lang.Object
implements EpochEventListener

This epoch event listener requests training termination after maxIterations epochs have expired.

Author:
Paul Hoehne

Constructor Summary
MaxIterationsListener()
          Default constructor.
MaxIterationsListener(int val)
          Constructor that sets the maximum number of iterations.
 
Method Summary
 void epochEnd(TrainingEpochEvent evt)
          Implements the listener interface and handles the end of epoch event.
 int getMaxIterations()
          The maximum number of iterations.
 void setMaxIterations(int maxIterations)
          The maximum number of iterations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaxIterationsListener

public MaxIterationsListener()
Default constructor.


MaxIterationsListener

public MaxIterationsListener(int val)
Constructor that sets the maximum number of iterations.

Parameters:
val - The maximum number of iterations.
Method Detail

getMaxIterations

public int getMaxIterations()
The maximum number of iterations.

Returns:
Returns the maxIterations.

setMaxIterations

public void setMaxIterations(int maxIterations)
The maximum number of iterations.

Parameters:
maxIterations - The maxIterations to set.

epochEnd

public void epochEnd(TrainingEpochEvent evt)
Implements the listener interface and handles the end of epoch event. If ther number of training iterations is > the maximum iterations value, then training is stopped.

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