Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBug fix in pareto.py, Pareto::divide_conquer_nd #107
Conversation
|
Thank you for this bugfix. Could you please remove the non-necessary lines (208, 214, 283-297)? Then we can proceed and merge your fix with master. |
|
Thanks. Maybe you can turn that code into a test in Either adapt test_hypervolume to include this particular case, or make a second test_hypervolume. |
…test_pareto.py.
codecov-io
commented
Sep 7, 2018
•
Codecov Report
@@ Coverage Diff @@
## master #107 +/- ##
==========================================
+ Coverage 99.91% 99.91% +<.01%
==========================================
Files 18 18
Lines 1118 1121 +3
==========================================
+ Hits 1117 1120 +3
Misses 1 1
Continue to review full report at Codecov.
|
|
@smanist can you update your master to the last one. Hopefully this will also trigger all tests so I can merge this (in the future it is perhaps better to have a separate branch for a PR instead of master). Thanks. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

smanist commentedSep 6, 2018
The algorithm in
Pareto::divide_conquer_ndfails when two points in the Pareto set have the same value in a certain dimension. An example is included in the modifiedpareto.py:The Pareto set
d21contains three points, two of which have a value of 2.0 in the first dimension. Ordering the three points results in different ways results in different values of the hypervolume (28 and 32), which are all wrong (should be 29).The issue is in the dominance test associated with
_is_test_requiredmethod andpseudo_pf. The arraypseudo_pfassigns different ranks to the same values. Therefore, by reordering the Pareto set in the test case, different pseudo Pareto sets are generated for the same Pareto set.I figured out two ways for the fix. One is to fix
pseudo_pfby sorting the Pareto set such that the same values are assigned the same rank (e.g. using scipy.stats.rankdata). The other is to fix the dominance test by checking the actual Pareto set. The first one leads to more iterations in the algorithm. Therefore, I implemented the second approach inpareto.pywith a minimum modification - although some simplifications of the code are possible.