public class Poblacion
extends java.lang.Object
Title: Poblacion (Population).
Description: This class implements the population of chromosomes used to perform the genetic algorithm
Constructor and Description |
---|
Poblacion(int tamPoblacion,
BaseR baseReglas,
myDataset train)
Paramenter constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
BETTER(double a,
double b)
Checks if the double a is greater than b.
|
Individuo |
getMejor() |
void |
procesoGenetico(int nGeneraciones,
double crossProb,
double mutProb)
Performs the GA to generate the different solutions.
|
public Poblacion(int tamPoblacion, BaseR baseReglas, myDataset train)
tamPoblacion
- population size.baseReglas
- rulesbase used to build the population.train
- examples used to build the population (training dataset).public boolean BETTER(double a, double b)
a
- first given number.b
- second given number.public Individuo getMejor()
public void procesoGenetico(int nGeneraciones, double crossProb, double mutProb)
nGeneraciones
- maximum number of generations.crossProb
- cross probability.mutProb
- mutation probability.