|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.udc.gii.common.eaf.stoptest.SimpleStopTest
es.udc.gii.common.eaf.stoptest.BestMeanConvergence
public class BestMeanConvergence
This class implements a simple stoptest. The objective is reached when the current population of the passed evolutionary algorithm has converged to a specified rate. The convergence is messured as the difference between the best fitness value and the mean fitness of the population. So, it is a phenotypic convergence measure.
The convergence rate is specified as a configuration parameter. A convergence rate of 1.0 means that all individuals in the population have the same genotype. A convergence rate of 0.x means that, in average, each two individuals from the population share their genotypes at x %.
Convergence rates between 0.6 and 0.9 have yield good results for populations of 5 individuals. This class is only suitable for individuals with the same number of genes and for internal values of type 'double'.
To use and configure this stop test, you must add the following xml code in the appropriate section of the configuration file:
<StopTest>
<Class>es.udc.gii.common.eaf.stoptest.BestMeanConvergence</Class>
<ConvergenceRate>value</ConvergenceRate>
</StopTest>
Field Summary | |
---|---|
private double |
convergenceRate
|
Constructor Summary | |
---|---|
BestMeanConvergence()
Creates a new instance of BitwiseConvergence |
Method Summary | |
---|---|
void |
configure(org.apache.commons.configuration.Configuration conf)
Configure this stop test. |
boolean |
isReach(EvolutionaryAlgorithm algorithm)
Returns true if the problem reach the objective. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private double convergenceRate
Constructor Detail |
---|
public BestMeanConvergence()
Method Detail |
---|
public boolean isReach(EvolutionaryAlgorithm algorithm)
StopTest
algorithm
- The algorithm wich has to reach the objective
public void configure(org.apache.commons.configuration.Configuration conf)
conf
- Configuration object which contains the configuration values.Configuration
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |