Closed rat-h closed 4 years ago
I'm trying to follow this paper Optimizing computer models of corticospinal neurons to replicate in vitro dynamics and employ NSGA2 for parameter fitting of neurons.
I found that NSGA2 optimizes only the first fitness value in the multiobjective optimization problem.
I think, there is a problem in inspyred/ec/replacers, function: nsga_replacement line 350:
nsga_replacement
combined[p] < combined[q]
which leads to inspyred/ec/ec class Individual, operator __lt__, where two fitness lists are comparing (lines 335 and 337)
__lt__
return self.fitness < other.fitness
A simple test shows that python compares only the first element of the list and, seems, ignores others:
>>> [11.1 , 0. , 0.]<[ 11.0 , 3393.63 , 3411.87 ] False
For non-dominant minimization, fitness function on the left of < is the dominant solution, but compassing makes it non-dominant.
If you use a multiobjective method, you have to wrap your fitness in a Pareto object in the evaluator, as described in the documentation. The Pareto class overloads less-than to provide a dominance operator.
Description
I'm trying to follow this paper Optimizing computer models of corticospinal neurons to replicate in vitro dynamics and employ NSGA2 for parameter fitting of neurons.
I found that NSGA2 optimizes only the first fitness value in the multiobjective optimization problem.
I think, there is a problem in inspyred/ec/replacers, function:
nsga_replacement
line 350:which leads to inspyred/ec/ec class Individual, operator
__lt__
, where two fitness lists are comparing (lines 335 and 337)A simple test shows that python compares only the first element of the list and, seems, ignores others:
For non-dominant minimization, fitness function on the left of < is the dominant solution, but compassing makes it non-dominant.