eaLib API Docs
Last Modified : January 7 2002

mss.ea.trm
Class RunningMeanStreamCondition

java.lang.Object
  |
  +--mss.ea.trm.AbstractStreamCondition
        |
        +--mss.ea.trm.ScoreStreamCondition
              |
              +--mss.ea.trm.RunningMeanStreamCondition
All Implemented Interfaces:
StreamCondition

public class RunningMeanStreamCondition
extends ScoreStreamCondition

Termination dependent on the running mean value. The termination condition is fulfilled, if current best score - mean value of best score of last n generations falls under a particular threshold. The threshold and the number of generations can be specified in the constructor.

Since:
0.1
Version:
0.1 (08-21-2001)
Author:
Andreas Rummler

Field Summary
protected  boolean arrayFull
          Indication, if meanArray is full and the mean value can be calculated.
protected  int currentIndex
          Index for insertion of the next best score.
protected  double[] doubleArray
          Array for holding the mean values of the last n generations (double).
protected  float[] floatArray
          Array for holding the mean values of the last n generations (float).
protected  int generations
          Number of generations to use for mean value calculation.
protected  int[] intArray
          Array for holding the mean values of the last n generations (int).
protected  long[] longArray
          Array for holding the mean values of the last n generations (long).
protected  float threshold
          Threshold.
 
Fields inherited from class mss.ea.trm.ScoreStreamCondition
DOUBLE, FLOAT, INT, LONG, mode, NONE
 
Fields inherited from class mss.ea.trm.AbstractStreamCondition
comp
 
Constructor Summary
RunningMeanStreamCondition(float threshold, int generations)
          Constructor.
 
Method Summary
 boolean isTrue(IndividualStream is)
          Test of break condition.
 
Methods inherited from class mss.ea.trm.AbstractStreamCondition
getComparator, setComparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threshold

protected float threshold
Threshold.

generations

protected int generations
Number of generations to use for mean value calculation.

doubleArray

protected double[] doubleArray
Array for holding the mean values of the last n generations (double).

floatArray

protected float[] floatArray
Array for holding the mean values of the last n generations (float).

intArray

protected int[] intArray
Array for holding the mean values of the last n generations (int).

longArray

protected long[] longArray
Array for holding the mean values of the last n generations (long).

currentIndex

protected int currentIndex
Index for insertion of the next best score.

arrayFull

protected boolean arrayFull
Indication, if meanArray is full and the mean value can be calculated.
Constructor Detail

RunningMeanStreamCondition

public RunningMeanStreamCondition(float threshold,
                                  int generations)
Constructor.
Parameters:
threshold - threshold value
Method Detail

isTrue

public boolean isTrue(IndividualStream is)
Test of break condition.
Overrides:
isTrue in class AbstractStreamCondition
Returns:
result of test of break condition.

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS