public class Poblacion
extends java.lang.Object
Title: Poblacion (Population).
Description: This class implements the population of trees used to perform the genetic algorithm
Constructor and Description |
---|
Poblacion()
Default Constructor.
|
Poblacion(myDataset train,
double pSplit,
int nGenerations,
int nCross,
int nMut,
int nClone,
int nImmigration)
Paramenter constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
BETTER(double a,
double b)
Checks if the double a is greater than b.
|
void |
hacerGenetico()
Executes the genetic algorithm over the population.
|
Tree |
mejorSolucion()
Returns the best solution founded.
|
public Poblacion()
public Poblacion(myDataset train, double pSplit, int nGenerations, int nCross, int nMut, int nClone, int nImmigration)
nGenerations
- maximum number for generations.pSplit
- Splitting probability.train
- training dataset.nCross
- Number of crossovers done.nMut
- Number of mutations done.nClone
- Number of clones.nImmigration
- Number of immigrations.public boolean BETTER(double a, double b)
a
- first given number.b
- second given number.public void hacerGenetico()
public Tree mejorSolucion()