|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.epochx.op.selection.LinearRankSelector<TYPE>
public class LinearRankSelector<TYPE>
Linear rank selection chooses programs by fitness rank. All the programs in the population are ranked according to their fitness from lowest to highest. Each program is then assigned a probability according to their rank in a linear fashion with a gradient as given at construction.
| Constructor Summary | |
|---|---|
LinearRankSelector(GPModel<TYPE> model,
double gradient)
|
|
| Method Summary | |
|---|---|
java.util.List<CandidateProgram<TYPE>> |
getPool(java.util.List<CandidateProgram<TYPE>> pop,
int poolSize)
Constructs a pool of programs from the population, choosing each one with the program selection element of LinearRankSelector. |
CandidateProgram<TYPE> |
getProgram()
Selects a candidate program from the population using the probabilities which were assigned based on fitness rank. |
void |
setSelectionPool(java.util.List<CandidateProgram<TYPE>> pop)
Sets the population from which programs will be selected. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LinearRankSelector(GPModel<TYPE> model,
double gradient)
| Method Detail |
|---|
public void setSelectionPool(java.util.List<CandidateProgram<TYPE>> pop)
setSelectionPool in interface ProgramSelector<TYPE>pop - the population of candidate programs from which programs
should be selected.public CandidateProgram<TYPE> getProgram()
getProgram in interface ProgramSelector<TYPE>
public java.util.List<CandidateProgram<TYPE>> getPool(java.util.List<CandidateProgram<TYPE>> pop,
int poolSize)
getPool in interface PoolSelector<TYPE>pop - the population of CandidatePrograms from which the programs
in the pool should be chosen.poolSize - the number of programs that should be selected from the
population to form the pool. If poolSize is zero or less
then no selection takes place and the given population
is returned unaltered.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||