public abstract class GeneticIndividualForModels extends GeneticIndividual
Class for management of genetic individuals in Models
Modifier and Type | Field and Description |
---|---|
protected Model |
m |
protected static double[][] |
X |
protected static double[] |
Y |
protected static double[] |
Yo |
CUSTOM_CESAR, fitnessType, g, STANDARD
Constructor and Description |
---|
GeneticIndividualForModels(int tf)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
debug()
Method for debug
|
double |
fitness()
This method calculate the model error using the examples set
|
double[] |
getYo()
This method return the result of the model
|
void |
setExamples(double[][] pX,
double[] pY)
This method inicialize the examples
|
clone, crossover, localOptimization, mutation, parametersFromGenotype, Random
protected static double[][] X
protected static double[] Y
protected static double[] Yo
protected Model m
public GeneticIndividualForModels(int tf)
Constructor. Initialize the type of fitness
tf
- The type of fitnesspublic double fitness() throws invalidFitness
This method calculate the model error using the examples set
fitness
in class GeneticIndividual
invalidFitness
- Message if errorpublic void debug()
Method for debug
debug
in class GeneticIndividual
public double[] getYo()
This method return the result of the model
public void setExamples(double[][] pX, double[] pY)
This method inicialize the examples
pX
- The set of examplespY
- The sets of classes