Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about crowding distance calculation #5

Open
Mawad24 opened this issue Sep 25, 2017 · 1 comment
Open

Question about crowding distance calculation #5

Mawad24 opened this issue Sep 25, 2017 · 1 comment

Comments

@Mawad24
Copy link

Mawad24 commented Sep 25, 2017

Hello,
I am very interested in your code and I may use it during my work on the PHD thesis if you have no problem.
Actually I am new in this domain (NSGA 2 algorithm and related concepts) and I am trying to understand the code.
During my research about NSGA 2 algorithm I found that the crowding distance for individuals (other than the first and last one) is the difference of the objective value of two closet neighbors.
But in your code, you calculated the crowding distance of an individual by the difference of the crowding distance of two closet neighbors.
Can you explain please?

Thank you in advance for your time.

@guvcolie
Copy link

@Mawad24 , I think below is RIGHT:

front[index].crowding_distance +=
(front[index + 1].objectives[m] - front[index - 1].objectives[m]) /
(self.problem.max_objectives[m] - self.problem.min_objectives[m])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants