Search code examples
pythonoptimizationgenetic-algorithmrating

Crowding distance for rating multi objective problem solutions in python


I am trying to optimize a multi objective problem with genetic algorithm in python. In my research, I found out there is an interesting method for rating chromosomes based on all objective functions, named "crowding distance". Matlab has a function to calculate this measure. Is there any function in python to do that?


Solution

  • This library https://github.com/msu-coinlab/pymoo might be useful.

    Refer: from pymoo.algorithms.nsga2 import calc_crowding_distance

    https://github.com/msu-coinlab/pymoo/blob/20abef1ade71915352217400c11ece4c2f35163e/pymoo/algorithms/nsga2.py