Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add Das-Dennis weight initialization method #295
Add Das-Dennis weight initialization method #295
Changes from all commits
60f9264
96a1998
d7be57a
275ded3
501d486
cf1a9e7
dbfcf7e
7ebc527
a8c664e
d98f825
f9c5d7f
3c0b467
50f1245
cb3dc29
4f297c7
2399161
3268605
bb893f6
8ac1887
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Was the test failing with
populationSize = 150
?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.
This is because the binomial coefficient value (H) should equate to the size of the population. This algorithm is restrictive in that way. You can read Section IV (If I recall correctly) of the cited paper to know more. To ensure this, you can find I've added an
if
statement insideGenerate
method to catch a mismatch.The main point is, there is only a certain number of points that can be generated uniformly given the number of partitions(gaps between points) and the number of objectives.
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.
Note to myself, check that part in more depth.
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.
Add this to your notes.
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.
So, thinking about this... The lambda usage is nice, but should we maybe prefer to write this as a standalone function? Similar to the link post? Also, I think the code on the link post is 1-1 with what is written here. Do we need to worry about licensing?
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 reason for making it lambda inside the function was to secure the scope, it won't be used elsewhere. Regarding the heavy correlation, GFG (Geeks for geeks) is kinda open-sourced, and is made to help people(like Stack Overflow). Besides, finding Binomial Coefficient in O(n) isn't a ground breaking research that we're using without citing :) .
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.
According to https://www.geeksforgeeks.org/copyright-information/ this is fine, but let's add a comment which references the source for the code.
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.
It's not super clean, but I think it works, at least this way we can avoid the std::vector conversion.