|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Fitness
ec.multiobjective.MultiObjectiveFitness
ec.multiobjective.spea2.SPEA2MultiObjectiveFitness
public class SPEA2MultiObjectiveFitness
SPEA2MultiObjectiveFitness is a subclass of Fitness which implements basic multiobjective fitness functions along with support for the ECJ SPEA2 (Strength Pareto Evolutionary Algorithm) extensions.
The object contains two items: an array of floating point values representing the various multiple fitnesses (ranging from 0.0 (worst) to infinity (best)), and a single SPEA2 fitness value which represents the individual's overall fitness ( a function of the number of individuals it dominates and it's raw score where 0.0 is the best).
Parameters
base.num-objectives (else)multi.num-objectives int >= 1 |
(the number of fitnesses in the multifitness array) |
Field Summary | |
---|---|
static java.lang.String |
SPEA2FIT_PREAMBLE
|
double |
SPEA2Fitness
SPEA2 overall fitness |
double |
SPEA2kthNNDistance
SPEA2 NN distance |
double |
SPEA2RawFitness
SPEA2 RAW fitness |
double |
SPEA2Strength
SPEA2 strength (# of nodes it dominates) |
Fields inherited from class ec.multiobjective.MultiObjectiveFitness |
---|
FITNESS_POSTAMBLE, maximize, MULTI_FITNESS_POSTAMBLE, multifitness, P_MAXIMIZE, P_NUMFITNESSES |
Fields inherited from class ec.Fitness |
---|
FITNESS_PREAMBLE, P_FITNESS |
Constructor Summary | |
---|---|
SPEA2MultiObjectiveFitness()
|
Method Summary | |
---|---|
float |
calcDistance(SPEA2MultiObjectiveFitness otherFit)
Returns the sum of the squared differences between the vector fitness values. |
java.lang.String |
fitnessToString()
Print to a string the fitness in a fashion intended to be parsed in again via readFitness(...). |
java.lang.String |
fitnessToStringForHumans()
Print to a string the fitness in a fashion readable by humans, and not intended to be parsed in again. |
void |
readFitness(EvolutionState state,
java.io.DataInput dataInput)
Reads the binary form of an individual from a DataInput. |
void |
readFitness(EvolutionState state,
java.io.LineNumberReader reader)
Reads in the fitness from a form outputted by fitnessToString() and thus printFitnessForHumans(...). |
void |
writeFitness(EvolutionState state,
java.io.DataOutput dataOutput)
Writes the binary form of an individual out to a DataOutput. |
Methods inherited from class ec.multiobjective.MultiObjectiveFitness |
---|
betterThan, clone, defaultBase, equivalentTo, fitness, isIdealFitness, setup |
Methods inherited from class ec.Fitness |
---|
printFitness, printFitness, printFitnessForHumans |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SPEA2FIT_PREAMBLE
public double SPEA2Fitness
public double SPEA2Strength
public double SPEA2RawFitness
public double SPEA2kthNNDistance
Constructor Detail |
---|
public SPEA2MultiObjectiveFitness()
Method Detail |
---|
public float calcDistance(SPEA2MultiObjectiveFitness otherFit)
public java.lang.String fitnessToString()
Fitness
fitnessToString
in class MultiObjectiveFitness
public java.lang.String fitnessToStringForHumans()
Fitness
fitnessToStringForHumans
in class MultiObjectiveFitness
public void readFitness(EvolutionState state, java.io.LineNumberReader reader) throws java.io.IOException
Fitness
readFitness
in class MultiObjectiveFitness
java.io.IOException
public void writeFitness(EvolutionState state, java.io.DataOutput dataOutput) throws java.io.IOException
Fitness
writeFitness
in class MultiObjectiveFitness
java.io.IOException
public void readFitness(EvolutionState state, java.io.DataInput dataInput) throws java.io.IOException
Fitness
readFitness
in class MultiObjectiveFitness
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |