Make individual available in calls to isDominated

8 views
Skip to first unread message

Michael

unread,
Oct 16, 2014, 11:58:03 AM10/16/14
to deap-...@googlegroups.com
I found the way to use a custom isDominated function but would like to request a change to the function signature to accept individuals instead of fitness weights.

The use case is the following: I'm doing multiobjective optimization with NSGAII - one of the objective is the percentage of items in a set recognized by the solution. I need to switch the domination criteria to ask if the set of items in individual 1 are contained within the set of individual 2, or are disjoint.

To do this, I pass an attribute frozenset() to the individual and build a custom isDominated function to ask ind1.frozenset > ind2.frozenset, which can yield a different answer than just comparing the number of items recognized (ind1 can recognize more items, but ind2 items from a different subgroup).

I made all of that work but I had to hack around quite a few bits of DEAP to pass the individual instead of the fitness when calling my custom isDominated.

Would it be possible for this to be standard behavior? I realize it's an edge case but it would increase the potential flexibility of custom isDominated function, at no cost for the standard use case (you just refer to ind.fitness in the function).
Reply all
Reply to author
Forward
0 new messages