public class Population
extends java.lang.Object
Title: Populatoin
Description: This class contains the population for the genetic algorithm
Copyright: KEEL Copyright (c) 2008
Company: KEEL
Constructor and Description |
---|
Population()
Default Constructor
|
Population(myDataset train,
DataBase dataBase,
int size,
int nRules,
double crossProb,
int ruleWeight,
int compType,
int infType,
double p_DC,
double michProb)
Constructor with parameters
|
Modifier and Type | Method and Description |
---|---|
RuleBase |
bestRB()
It returns the best RB found so far
|
boolean |
BETTER(int a,
int b)
Maximization
|
void |
Generation(int n_generations)
Main procedure of the GA
|
void |
writeFile(java.lang.String filename)
Writes the best population / RB into file
|
public Population()
public Population(myDataset train, DataBase dataBase, int size, int nRules, double crossProb, int ruleWeight, int compType, int infType, double p_DC, double michProb)
train
- myDataset training setdataBase
- DataBase dataBasesize
- int population sizenRules
- int number of rulescrossProb
- double crossover probabilityruleWeight
- int rule weight idcompType
- int compatibility degree idinfType
- int inference type idp_DC
- double don't care probabilitymichProb
- double probability of performing a michigan iterationpublic boolean BETTER(int a, int b)
a
- int first numberb
- int second numberpublic void Generation(int n_generations)
n_generations
- int number of generationspublic void writeFile(java.lang.String filename)
filename
- String the name of the filepublic RuleBase bestRB()