public class Cogin
extends java.lang.Object
This class implements the COGIN algorithm from:
David Perry Greene and Stephen F. Smith. Competition-Based Induction of Decision Models from Examples. Machine Learning, 13: 229-257, 1993.
Constructor and Description |
---|
Cogin()
Default constructor
|
Cogin(java.lang.String paramfile)
Builds up the COGIN with the provided parameters in KEEL format
|
Modifier and Type | Method and Description |
---|---|
protected double |
classify(InstanceSet ISet,
java.lang.String[] instanciasIN,
java.lang.String[] instanciasOUT) |
protected void |
competitiveReplacement() |
protected void |
evaluate() |
protected void |
initialize() |
protected void |
onePointCrossover() |
protected void |
printRules() |
protected void |
randomSelection() |
void |
run()
Process the training and test files provided in the parameters file to the constructor.
|
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 Cogin()
Default constructor
public Cogin(java.lang.String paramfile)
Builds up the COGIN with the provided parameters in KEEL format
paramfile
- The path to the configuration file with all the parameters in KEEL formatprotected void initialize()
protected void randomSelection()
protected void onePointCrossover()
protected void evaluate()
protected void competitiveReplacement()
public void run()
Process the training and test files provided in the parameters file to the constructor.
public 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 nameprotected double classify(InstanceSet ISet, java.lang.String[] instanciasIN, java.lang.String[] instanciasOUT)
protected void printRules()