|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.supervised.attribute.gpattributegeneration.Population
public class Population
Population class to store a list of individuals in an ArrayList as well as other fields
Constructor Summary | |
---|---|
Population()
Create an empty population |
|
Population(java.util.ArrayList<Genome<Gene>> popList)
Copy (SHALLOW) the given ArrayList into a new population |
|
Population(EnumGenerationMethod genMethod,
java.util.Random rand,
java.util.ArrayList<java.lang.String> funcSet,
int popSize,
int maxDepth,
int[] validAttributes)
Generates a population with the specified generation method and size, using the specified Random object and funcSet. |
|
Population(Population popClonee)
Clones the given population in the process creating a new one. |
Method Summary | |
---|---|
void |
addAll(Population pop)
Appends all of the given individuals in the ArrayList to this population. |
void |
calculateFitness(EnumFitnessEvaluationMethod evalMethod,
Instances data,
Classifier classifier)
Calculates this population's fitness using the specified Classifier and fitness evaluation method. |
void |
calculateNsgaii()
Calculates NSGA-II fronts for this population and updates genomes with domination rank and crowding distance |
Genome<Gene> |
get(int index)
Returns the genome in the population at that index. |
java.util.ArrayList<java.lang.String> |
getFittestIndividuals()
Return the fittest individuals (as a string) in an ArrayList |
int |
getMaxLength()
Max length of the genomes in the population |
double |
getMaxTreeAccuracy()
Return the tree accuracy of the best individual(s) in the population. |
int |
getMaxTreeSize()
Return max tree size |
double |
getMaxVectorFitness()
Return max tree size |
int |
getMinLength()
Min length of the genomes in the population |
double |
getMinTreeAccuracy()
Return the tree accuracy of the worst individual(s) in the population. |
int |
getMinTreeSize()
Return min tree size |
double |
getMinVectorFitness()
Return min tree size |
java.util.ArrayList<java.util.ArrayList<Genome<Gene>>> |
getNonDomFronts()
Return the non dominated fronts (calculateNsgaii() must have been run beforehand) |
void |
removeRange(int fromIndex,
int toIndex)
Removes from the population all of the elements whose index is between fromIndex, inclusive, and toIndex, exclusive. |
int |
size()
Returns the size of the population |
void |
sort(EnumSortingCriteria sortBy)
Sorts the elements of the population list by the specified sorting criteria. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Population()
public Population(Population popClonee)
popClonee
- Population object to clonepublic Population(java.util.ArrayList<Genome<Gene>> popList)
popList
- Population list to copy into the new populationpublic Population(EnumGenerationMethod genMethod, java.util.Random rand, java.util.ArrayList<java.lang.String> funcSet, int popSize, int maxDepth, int[] validAttributes)
genMethod
- Generation method to use to create the populationrand
- Random object to create pseudo-random numbersfuncSet
- Function set to use for initialising the populationpopSize
- The size to make the populationvalidAttributes
- the valid numeric attributes that can be used as part of equationsMethod Detail |
---|
public void addAll(Population pop)
pop
- Individuals to combine with this populationpublic java.util.ArrayList<java.lang.String> getFittestIndividuals()
public double getMaxTreeAccuracy()
public double getMinTreeAccuracy()
public int getMaxLength()
public int getMinLength()
public int getMaxTreeSize()
public int getMinTreeSize()
public double getMaxVectorFitness()
public double getMinVectorFitness()
public int size()
public Genome<Gene> get(int index)
index
- Index of the element to return
public void removeRange(int fromIndex, int toIndex)
fromIndex
- index of the first individual to be removedtoIndex
- index after the last individual to be removedpublic void sort(EnumSortingCriteria sortBy)
sortBy
- Sorting Criteria to use when sortingpublic void calculateFitness(EnumFitnessEvaluationMethod evalMethod, Instances data, Classifier classifier)
evalMethod
- Fitness evaluation method to usedata
- Data to use when calculating fitnessclassifier
- Classifier to use for fitness evaluationpublic void calculateNsgaii()
public java.util.ArrayList<java.util.ArrayList<Genome<Gene>>> getNonDomFronts()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |