org.jgap.audit
Class Evaluator
- java.lang.Object
-
- org.jgap.audit.Evaluator
-
- All Implemented Interfaces:
- java.io.Serializable
public class Evaluator extends java.lang.Object implements java.io.SerializableGathers statistical data and returns them on request.- Since:
- 2.2
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classEvaluator.ChromosomeDataclassEvaluator.GenotypeDataGenotype data for one single runclassEvaluator.GenotypeDataAvgAveraged genotype data (computed over all runs of a permutation)
-
Constructor Summary
Constructors Constructor and Description Evaluator(PermutingConfiguration a_conf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description KeyedValues2DcalcAvgFitness(int a_permutation)Calculates the average fitness value curve for a given permutation.KeyedValues2DcalcAvgFitnessImpr(int a_permutation)Calculates average fitness value improvement per generation.Evaluator.GenotypeDataAvgcalcPerformance(int a_permutation)Calculates performance metrics for a given permutation and run stored before with storeGenotype, like: average fitness, maximum fitness...KeyedValues2DgetData()java.util.List<Evaluator.GenotypeDataAvg>getGenotypeAverageData()intgetNumberOfRuns(int a_permutation)java.lang.NumbergetValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)java.lang.NumbergetValue(int a_permutation, int a_run, java.lang.Comparable rowKey, java.lang.Comparable columnKey)booleanhasNext()Configurationnext()Evaluator.GenotypeDataretrieveGenotype(int a_permutation, int a_run)voidsetValue(double a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)voidsetValue(int a_permutation, int a_run, double a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)Sets a specific value.voidstoreGenotype(int a_permutation, int a_run, Genotype a_genotype)Stores information contained in the given genotype.voidstorePopulation(int a_permutation, int a_run, Population a_pop)Stores information contained in the given genotype.
-
-
-
Constructor Detail
-
Evaluator
public Evaluator(PermutingConfiguration a_conf)
-
-
Method Detail
-
hasNext
public boolean hasNext()
-
next
public Configuration next() throws InvalidConfigurationException
- Throws:
InvalidConfigurationException
-
setValue
public void setValue(double a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)
-
getValue
public java.lang.Number getValue(java.lang.Comparable rowKey, java.lang.Comparable columnKey)
-
setValue
public void setValue(int a_permutation, int a_run, double a_value, java.lang.Comparable a_rowKey, java.lang.Comparable a_columnKey)Sets a specific value.- Parameters:
a_permutation- inta_run- inta_value- doublea_rowKey- Comparablea_columnKey- Comparable- Since:
- 2.2
-
getValue
public java.lang.Number getValue(int a_permutation, int a_run, java.lang.Comparable rowKey, java.lang.Comparable columnKey)
-
getData
public KeyedValues2D getData()
-
calcAvgFitness
public KeyedValues2D calcAvgFitness(int a_permutation)
Calculates the average fitness value curve for a given permutation. If permutation -1 is given, a composition of all permutations available is created.- Parameters:
a_permutation- -1 to use all permutations- Returns:
- DefaultKeyedValues2D list of fitness values, one for each individual in the generation
- Since:
- 2.2
-
calcAvgFitnessImpr
public KeyedValues2D calcAvgFitnessImpr(int a_permutation)
Calculates average fitness value improvement per generation.- Parameters:
a_permutation- int- Returns:
- DefaultKeyedValues2D
- Since:
- 2.2
-
getNumberOfRuns
public int getNumberOfRuns(int a_permutation)
- Parameters:
a_permutation- the permutation to determine the number of runs for- Returns:
- the number of runs for the given permutation
-
storeGenotype
public void storeGenotype(int a_permutation, int a_run, Genotype a_genotype)Stores information contained in the given genotype.- Parameters:
a_permutation- inta_run- index of the run proceeded for the given genotypea_genotype- the genotype holding the population of chromosomes- Since:
- 2.2
-
storePopulation
public void storePopulation(int a_permutation, int a_run, Population a_pop)Stores information contained in the given genotype.- Parameters:
a_permutation- inta_run- index of the run proceeded for the given genotypea_pop- the population holding the relevant chromosomes- Since:
- 3.5 (originally named storeGenotype)
-
retrieveGenotype
public Evaluator.GenotypeData retrieveGenotype(int a_permutation, int a_run)
-
calcPerformance
public Evaluator.GenotypeDataAvg calcPerformance(int a_permutation)
Calculates performance metrics for a given permutation and run stored before with storeGenotype, like: average fitness, maximum fitness...- Parameters:
a_permutation- the permutation to compute the performance metrics for- Returns:
- computed statistical data
- Since:
- 2.2
-
getGenotypeAverageData
public java.util.List<Evaluator.GenotypeDataAvg> getGenotypeAverageData()
- Returns:
- Averaged genotype data
- Since:
- 3.5
-
-
DMelt 3.0 © DataMelt by jWork.ORG