public class Oiga
extends java.lang.Object
This class implements the OIGA algorithm from:
Zhu, F., Guan, S.-U. Ordered incremental training with genetic algorithms. International Journal of Intelligent Systems 19 (12), pp. 1239-1256
Constructor and Description |
---|
Oiga()
Default constructor
|
Oiga(java.lang.String paramfile)
Constructor for the KEEL parameter file
|
Modifier and Type | Method and Description |
---|---|
void |
crossOver()
It performs a one point crossover in the new poblation, using adjacent chromosomes as parents
|
void |
elitism()
Copy the survivorsPercent proportion of the old poblation into the bottom half of
the new one
|
void |
evaluate()
Its evaluate the NEW poblation, with the train data
|
void |
IGA(SEM sem)
Applies the Incremental Genetic Algorithm strategy.
|
void |
mutate()
Applies mutation in the new poblation
|
void |
onePointCrossover(int cr1,
int cr2)
One-point crossover
|
protected void |
printRules()
Print the current rules to the file specified by KEEL .
|
void |
run()
Runs the OIGA algorithm, with first creates and evolve a single SEM for
each attribute.
|
void |
selection()
Applies a roulette wheel selection
|
void |
tournament_selection()
Applies a tournament selection, with tournament size of 2
|
static void |
writeOutput(java.lang.String fileName,
java.lang.String[] instancesIN,
java.lang.String[] instancesOUT,
Attribute[] inputs,
Attribute output,
int nInputs,
java.lang.String relation)
Writes the output in KEEL format
|
public Oiga()
Default constructor
public Oiga(java.lang.String paramfile)
paramfile
- the file with the parameters of this methodpublic static void writeOutput(java.lang.String fileName, java.lang.String[] instancesIN, java.lang.String[] instancesOUT, Attribute[] inputs, Attribute output, int nInputs, java.lang.String relation)
fileName
- output fileinstancesIN
- output from instances of the input data setinstancesOUT
- class of classified instancesinputs
- the input attributesoutput
- the output attributenInputs
- number of input attributesrelation
- data set namepublic void onePointCrossover(int cr1, int cr2)
cr1
- index of parent 1 in poblationcr2
- index of parent 2 in poblationpublic void crossOver()
public void elitism()
public void mutate()
public void selection()
public void tournament_selection()
public void evaluate()
public void IGA(SEM sem)
sem
- the SEM model evolved for the actual attributepublic void run()
protected void printRules()
Print the current rules to the file specified by KEEL .