-
Notifications
You must be signed in to change notification settings - Fork 158
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
Result differ from R #6
Comments
我在学习nsga2的时候,也发现这里可能有个错误,可否给个联系方式一起交流一下? |
It seems like there is an issue in for k in range(1,len(front)-1):
distance[k] = distance[k]+ (values1[sorted1[k+1]] - values1[sorted1[k-1]])/(max(values1)-min(values1))
for k in range(1,len(front)-1):
distance[k] = distance[k]+ (values2[sorted2[k+1]] - values2[sorted2[k-1]])/(max(values2)-min(values2)) instead of for k in range(1,len(front)-1):
distance[k] = distance[k]+ (values1[sorted1[k+1]] - values2[sorted1[k-1]])/(max(values1)-min(values1))
for k in range(1,len(front)-1):
distance[k] = distance[k]+ (values1[sorted2[k+1]] - values2[sorted2[k-1]])/(max(values2)-min(values2)) I'm not for 100% sure that this is accurate fix, but it based on original paper (http://www.dmi.unict.it/mpavone/nc-cs/materiale/NSGA-II.pdf, p. 185, bottom of the page). Hope it will help! UPD: Just found out that there is already a pull request for this issue. |
Hello, I test the code and compare the results with R. Why is the number of result values different from R's result? I am a beginner to the NSGA. I appreciate if anyone has idea about it. Many thanks.
The text was updated successfully, but these errors were encountered: