-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Implement NSGA-III #4436
Implement NSGA-III #4436
Conversation
The detailed descriptions of the experiment are as follows:
|
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #4436 +/- ##
==========================================
+ Coverage 90.88% 90.90% +0.01%
==========================================
Files 184 186 +2
Lines 13959 14269 +310
==========================================
+ Hits 12687 12971 +284
- Misses 1272 1298 +26
... and 11 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I have some early comments and questions. I will review the details of _normalize
,_associate
, and _niching
in the next week.
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
…optuna into implement-nsgaiii
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your long running. LGTM!
I found that the module of |
Thanks for your comment. I renamed the module and changed the import paths. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your update. I found two functions which are not used in the test cases. Could you check them?
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your update. I have two minor comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change basically looks good to me. Let me add some minor comments.
asf_value = np.max( | ||
np.einsum("nm,dm->dnm", objective_matrix, weights), | ||
axis=2, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this corresponds to eq. 4 of https://www.egr.msu.edu/~kdeb/papers/k2012009.pdf. We might mention it in the code comment, but we can work on it in a follow-up PR.
perpendicular_vectors_to_reference_lines = np.einsum( | ||
"ni,pi,p,pm->npm", | ||
objective_matrix, | ||
reference_points, | ||
1 / reference_point_norm_squared, | ||
reference_points, | ||
) | ||
distance_from_reference_lines = np.linalg.norm( | ||
objective_matrix[:, np.newaxis, :] - perpendicular_vectors_to_reference_lines, | ||
axis=2, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto. This seems to correspond to L5 to 7 of Algorithm 3 in https://www.egr.msu.edu/~kdeb/papers/k2012009.pdf. We'd like to improve the readability in a follow-up PR.
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
Co-authored-by: Toshihiko Yanase <toshihiko.yanase@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you for completing such a long-running PR!
We have possible follow-up tasks, but I don't think they are critical:
Motivation
Implement NSGA-III algorithm, which is a modified version of NSGA-II for many-objective optimization problem. This algorithm is also desired at #4075.
Description of the changes
Implement
NSGAIIISampler
which realizes NSGA-III algorithm. The main change in the algorithms is the strategy used to determine who survives from the boundary front, where NSGA-II uses crowding distance while NSGA-III uses reference points.The difference between NSGA-II and NSGA-III in implementation is the following two points:
NSGAIIISampler
has attributereference_points
used in_select_elite_population()
_crowding_distance_sort()
called from_select_elite_population()
is replaced with new procedure proposed in NSGA-III algorithm.Other part of
nsgaiii.py
is almost the same asnsgaii/_sampler.py
.As confirmed in the following benchmark results on test problems, NSGA-III is competitive enough compared to NSGA-II in terms of hyper volume metric.
In addition, the results of NSGA-III tends to be more diverse as observed in the following plots.
This is because the crowding distance is set to infinite when an individual has the largest or smallest value on any of the objective axes, and such individuals always survive. Therefore, the resulting points of NSGA-II tend to concentrate near the axes (i.e., take extreme values) in situations where the dimension is large and the first front often becomes the boundary rank front.