|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Fitness
Hold desired outputs for fitness cases, and calculates the fitness for a given Tree
Method Summary | |
---|---|
void |
assign(Individual ind,
double[] fit)
|
double[] |
calculate(Output outputs,
Individual ind,
ProblemData problemData,
int[] wSamples)
Calculate the fitness for an Individual, given its outputs (the Individual is already evaluated). |
java.lang.Object |
clone()
Make a copy This method must be implemented cloned instances must be independent. |
Output |
getProcessedOutput(Output raw,
ProblemData problemData)
Take the output of an Individual and add anything the fitness might need to add, like statistics or aditional calculations related to the fitness. |
void |
init(Config config,
ProblemData problemData,
Output desiredOutputs,
double[] weights)
Initializes the Fitness, receiving the desired outputs and the wheights (importance) for each sample. |
void |
init(Config config,
ProblemData problemData,
java.lang.String fileName)
Initializes the Fitness, reading desired outputs from file |
void |
setCallingThread(int wThread)
|
Method Detail |
---|
void init(Config config, ProblemData problemData, java.lang.String fileName)
config
- The evolution config, might be needed inside the FitnessproblemData
- The current problem's data, might also be needed (for instance to know the
numer of samples used)fileName
- The file to readvoid init(Config config, ProblemData problemData, Output desiredOutputs, double[] weights)
config
- The evolution config, might be needed inside the FitnessproblemData
- The current problem's data, might also be needed (for instance to know
the number of samples used)desiredOutputs
- The desired outputsweights
- The weight (importance) of each sampledouble[] calculate(Output outputs, Individual ind, ProblemData problemData, int[] wSamples)
outputs
- The output of the Individualind
- The Individual.problemData
- The problem's data (might be needed to calculate the fitness)void assign(Individual ind, double[] fit)
Output getProcessedOutput(Output raw, ProblemData problemData)
raw
- The "raw" output of the individualproblemData
- The data to evaluate on
java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
void setCallingThread(int wThread)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |