Closed schrum2 closed 1 year ago
We could also have a log that tracked the hypervolume for each individual bin's Pareto fronts.
By the way, you can calculate hypervolume using jmetal.qualityIndicator.Hypervolume. However, I believe the only other example of how to use this that exists in the code reads the data from a text file rather than directly from an array or list of scores, so a little bit of data manipulation is needed. However, this code is not well documented (it came from some other research project, and honestly I haven't used it much). You will definitely need to use the calculateHypervolume method. This assumes you have a 2D array of scores that already represents scores from a Pareto front. However, the more I look at this, I'm realizing that we need a whole separate issue for making it easy to calculate a hypervolume, so I'll make that and refer to it here https://github.com/schrum2/MM-NEAT/issues/917.
Let's do some simple unit tests of this. For example, the hypervolume of a population with just one member should be the product of all the objectives. You could also set up a simple 2-objective example with just two points, and figure out how the two boxes would interact in 2D to determine the appropriate volume.
Created unit tests which passed as expected
This will tie in with #891
Make a class
edu.southwestern.util.MultiobjectiveUtil
that has some methods for computing Pareto fronts. Use the classjmetal.qualityIndicator.Hypervolume
but make the interface better. In particular, we want methods like this:public static double hypervolumeFromParetoFront(List<Score> scores)
and
public static double hypervolumeFromPopulation(List<Score> scores)
The main difference with this second one is that the population may not be a Pareto front yet, and this the population will need to be filtered down to only the members of the Pareto front first.