|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSciLib.Neuro.Population
public class Population
This class defines a Population class that contains a genetic algorithm.
| Field Summary | |
|---|---|
(package private) FunctionmD |
f
|
| Constructor Summary | |
|---|---|
Population()
default constructor |
|
| Method Summary | |
|---|---|
double |
averageFitness()
Compute the average fitness |
void |
computeTheBest()
Generate theBestGen for all variables |
void |
crossover()
Crossover selection: selects two parents that take part in the crossover. |
void |
elitist()
Elitist function: If the best member of the current generation is worse then the best member of the previous generation, the latter one would replace the worst member of the current population |
void |
evaluate()
evaluate the fitness |
void |
Evolution()
Evolution process |
void |
genFunction(FunctionmD func)
generate Problem Function |
vector |
getBestGen()
get the best generation vector |
matrix |
getChromosome()
get the chromosome matrix |
vector |
getFitness()
get the fitness vector |
double |
getNumGen()
get tne maximum number of generations |
int |
getNumVar()
get tne number of variables |
double |
getpMutation()
get the probability of mutation |
int |
getpopSize()
get tne population size |
double |
getpxOver()
get the probability of crossover |
double |
getTheBest()
get theBest value |
void |
initialize()
Initialize the population |
void |
mutate()
Mutation: Random uniform mutation. |
void |
nextGeneration()
generate next generation |
void |
read(java.lang.String fileName)
Read a data file that contains information about a problem File format Number of variables : nVar Number of populations : nPop Maximum generations : maxGen probability of crossover : pxOver probability of mutation : pMutation Upper Limit : upper[i] Lower Limit : lower[i] |
double |
stddveFitness()
Compute the standard deviation fitness |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
FunctionmD f
| Constructor Detail |
|---|
public Population()
| Method Detail |
|---|
public double getTheBest()
public int getNumVar()
public int getpopSize()
public double getNumGen()
public double getpxOver()
public double getpMutation()
public matrix getChromosome()
public vector getFitness()
public vector getBestGen()
public void genFunction(FunctionmD func)
public void read(java.lang.String fileName)
public void initialize()
public void computeTheBest()
public void elitist()
public void evaluate()
public void nextGeneration()
public void crossover()
public void mutate()
public void Evolution()
public double averageFitness()
public double stddveFitness()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||