public abstract class GeneticIndividualForClassification extends GeneticIndividual
Modifier and Type | Field and Description |
---|---|
protected Classifier |
c |
protected static int[] |
C |
protected static int[] |
Co |
protected static double[][] |
X |
CUSTOM_CESAR, fitnessType, g, STANDARD
Constructor and Description |
---|
GeneticIndividualForClassification(int tf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
debug()
This method is for debug
|
double |
fitness()
This method calculate the classification error using the examples set
|
int[] |
getCo()
This method return the result of classification
|
void |
setExamples(double[][] pX,
int[] pC)
This method initialize the examples and create a new classifier
|
clone, crossover, localOptimization, mutation, parametersFromGenotype, Random
protected static double[][] X
protected static int[] C
protected Classifier c
protected static int[] Co
public GeneticIndividualForClassification(int tf)
Constructor. Initialize the type of fitness
tf
- The type of fitnesspublic double fitness() throws invalidFitness
This method calculate the classification error using the examples set
fitness
in class GeneticIndividual
invalidFitness
- Message if errorpublic void debug()
This method is for debug
debug
in class GeneticIndividual
public int[] getCo()
This method return the result of classification
public void setExamples(double[][] pX, int[] pC)
This method initialize the examples and create a new classifier
pX
- The set of examplespC
- The sets of classes