public double invertedGenerationalDistance(double [][] front,
double [][] trueParetoFront,
int numberOfObjectives) {
/**
* Stores the maximum values of true pareto front.
*/
double [] maximumValue ;
/**
* Stores the minimum values of the true pareto front.
*/
double [] minimumValue ;
/**
* Stores the normalized front.
*/
double [][] normalizedFront ;
/**
* Stores the normalized true Pareto front.
*/
double [][] normalizedParetoFront ;
// STEP 1. Obtain the maximum and minimum values of the Pareto front
maximumValue = utils_.getMaximumValues(trueParetoFront, numberOfObjectives);
minimumValue = utils_.getMinimumValues(trueParetoFront, numberOfObjectives);
// STEP 2. Get the normalized front and true Pareto fronts
normalizedFront = utils_.getNormalizedFront(front,
maximumValue,
minimumValue);
normalizedParetoFront = utils_.getNormalizedFront(trueParetoFront,
maximumValue,
minimumValue);
// STEP 3. Sum the distances between each point of the true Pareto front and
// the nearest point in the true Pareto front
double sum = 0.0;
for (double[] aNormalizedParetoFront : normalizedParetoFront)
sum += Math.pow(utils_.distanceToClosedPoint(aNormalizedParetoFront,
normalizedFront),
pow_);
// STEP 4. Obtain the sqrt of the sum
sum = Math.pow(sum,1.0/pow_);
// STEP 5. Divide the sum by the maximum number of points of the front
double generationalDistance = sum / normalizedParetoFront.length;
return generationalDistance;
} // generationalDistance
function score = IGD(Population,optimum)
% <min>
% Inverted generational distance
%------------------------------- Reference --------------------------------
% C. A. Coello Coello and N. C. Cortes, Solving multiobjective optimization
% problems using an artificial immune system, Genetic Programming and
% Evolvable Machines, 2005, 6(2): 163-190.
%------------------------------- Copyright --------------------------------
% Copyright (c) 2021 BIMK Group. You are free to use the PlatEMO for
% research purposes. All publications which use this platform or any code
% in the platform should acknowledge the use of "PlatEMO" and reference "Ye
% Tian, Ran Cheng, Xingyi Zhang, and Yaochu Jin, PlatEMO: A MATLAB platform
% for evolutionary multi-objective optimization [educational forum], IEEE
% Computational Intelligence Magazine, 2017, 12(4): 73-87".
%--------------------------------------------------------------------------
PopObj = Population.best.objs;
if size(PopObj,2) ~= size(optimum,2)
score = nan;
else
score = mean(min(pdist2(optimum,PopObj),[],2));
end
end
Jmetal - Reference: Van Veldhuizen, D.A., Lamont, G.B.: Multiobjective Evolutionary Algorithm Research: A History and Analysis. Technical Report TR-98-03, Dept. Elec. Comput. Eng., Air Force Inst. Technol. (1998)
PlatEMO - C. A. Coello Coello and N. C. Cortes, Solving multiobjective optimization problems using an artificial immune system, Genetic Programming and Evolvable Machines, 2005, 6(2): 163-190.
public double invertedGenerationalDistance(double[][] front,
double[][] trueParetoFront,
int numberOfObjectives) {
/**
* Stores the maximum values of true pareto front.
*/
double[] maximumValue;
/**
* Stores the minimum values of the true pareto front.
*/
double[] minimumValue;
/**
* Stores the normalized front.
*/
double[][] normalizedFront;
/**
* Stores the normalized true Pareto front.
*/
double[][] normalizedParetoFront;
normalizedFront = front;
normalizedParetoFront = trueParetoFront;
// // STEP 3. Sum the distances between each point of the true Pareto front and
// // the nearest point in the true Pareto front
// double sum = 0.0;
// for (double[] aNormalizedParetoFront : normalizedParetoFront)
// sum += Math.pow(utils_.distanceToClosedPoint(aNormalizedParetoFront,
// normalizedFront),
// pow_);
//
//
// // STEP 4. Obtain the sqrt of the sum
// sum = Math.pow(sum,1.0/pow_);
double sum = 0.0;
for (double[] aNormalizedParetoFront : normalizedParetoFront)
sum += utils_.distanceToClosedPoint(aNormalizedParetoFront,
normalizedFront);
// STEP 5. Divide the sum by the maximum number of points of the front
double generationalDistance = sum / normalizedParetoFront.length;
return generationalDistance;
} // generationalDistance