|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgpalta.clustering.FitnessClusteringCS
public class FitnessClusteringCS
Constructor Summary | |
---|---|
FitnessClusteringCS()
|
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). |
double[] |
calculateNative(int wThread,
double[][] outputs,
int nSamples,
int nClusters,
int[] samples,
int nSubSamples,
int useHits,
int normalizeOutputs,
int discretize)
|
double[] |
calculateNativeInterface(Output outputs,
ProblemData problemData,
int[] wSamples)
|
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. |
int |
hits(int[] system,
int[] actual,
int nClasses)
|
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 |
initNative(int wThread,
double[][] kernel,
int nSamples,
int nClusters,
int[][] close,
int[] nClose)
|
void |
setCallingThread(int wThread)
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FitnessClusteringCS()
Method Detail |
---|
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Fitness
clone
in interface Fitness
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public void setCallingThread(int wThread)
setCallingThread
in interface Fitness
public void init(Config config, ProblemData problemData, java.lang.String fileName)
Fitness
init
in interface Fitness
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 readpublic void init(Config config, ProblemData problemData, Output desiredOutputs, double[] weights)
Fitness
init
in interface Fitness
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 samplepublic double[] calculateNative(int wThread, double[][] outputs, int nSamples, int nClusters, int[] samples, int nSubSamples, int useHits, int normalizeOutputs, int discretize)
public void initNative(int wThread, double[][] kernel, int nSamples, int nClusters, int[][] close, int[] nClose)
public double[] calculateNativeInterface(Output outputs, ProblemData problemData, int[] wSamples)
public double[] calculate(Output outputs, Individual ind, ProblemData problemData, int[] wSamples)
Fitness
calculate
in interface Fitness
outputs
- The output of the Individualind
- The Individual.problemData
- The problem's data (might be needed to calculate the fitness)public void assign(Individual ind, double[] fit)
assign
in interface Fitness
public Output getProcessedOutput(Output raw, ProblemData problemData)
Fitness
getProcessedOutput
in interface Fitness
raw
- The "raw" output of the individualproblemData
- The data to evaluate on
public int hits(int[] system, int[] actual, int nClasses)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |