AureumChaos/LEAP

Crowding distance goes to NaN when one objective is flat

lukepmccombs opened this issue · 5 comments

If all individuals in a rank are equal on an objective, the distance goes to NaN. This is because the scale normalization in the divisor is zero, leading to a divide by zero error. The original paper doesn't describe a solution, but my intuition is to treat it as degenerating in dimensions and just zero out that term for crowding distance.

This is fairly uncommon, since the rank has to be comprised of identically fit individuals for one to not be demoted.

Edit: This would get more common the greater the number of objectives, since there are more for them to be nondominated on.

This isn't an unknown aspect, but it is definitely one that hasn't been much studied. I'm going to check out some other implementations and see how they handle it.

SigmaX commented

Hmm—I merged the PR, and I thought the tests passed on my local, but the CI pipeline is complaining:

image

Might merit a second look?

I think I know what caused that, but that is another semantics thing. I believe that should be the proper behavior though, its the reference values that need updating.

Essentially, should the two "lowest" and "highest" individuals in a rank for an objective have infinite distance if that objective were flat? This especially important because those individuals would be chosen arbitrarily according to how they had been sorted. I think not, since there is no proper definition of "lower" or "higher" individuals in this situation.

In the case of this test, there are two individuals that exist alone in their rank. Thus, all objectives are zero scale and skipped.