DEAP / deap

Distributed Evolutionary Algorithms in Python
http://deap.readthedocs.org/
GNU Lesser General Public License v3.0
5.69k stars 1.11k forks source link

Problems prioritizing objectives using Deap (Nsga2) #494

Open guzman2 opened 4 years ago

guzman2 commented 4 years ago

Hello everyone I am new to programming in python and I have some problems using the Nsga2 multi-objective algorithm. At first, I thought I could prioritize objectives by varying the weight values ​​like this: weights = ( 9.0, -1.0) . After reading a little I realized that it cannot be done in this way but the weight can be varied in the crowding distance sort.

image

I looked for the crowding distance sort code but I did not quite understand where it should be modified to give weights to the objectives, next I will show the code:

image

The question I would like to ask is whether it is possible to somehow change the weights to the targets in this algorithm. I would be very grateful if someone can solve this question for me.

fmder commented 3 years ago

Actually, NSGA-II rescale objectives to perform crowding distance. This means that the algorithm looks to spread the solutions equally in each dimension according to scale.