Pareto: Genereate unique centroids, documentation, test#177
Merged
timokau merged 4 commits intokiudee:masterfrom Nov 20, 2020
Merged
Pareto: Genereate unique centroids, documentation, test#177timokau merged 4 commits intokiudee:masterfrom
timokau merged 4 commits intokiudee:masterfrom
Conversation
7 tasks
I think default values for internal functions just hinder understanding. Changed the parameter names to be less domain specific, since we are just talking about a point in the ball for the purposes of this function. Since this is an internal function, we can require an already initialized random state. Result of this discussion / explanation: kiudee#164 (comment)
Thereby fixing a bug when the number of instances is not a multiple of 10. Result of this discussion kiudee#164 (comment)
Default values for internal functions just add confusion. The parameter names had conflicting meaning, so I switched them to less domain-specific ones. We can assume random states are initialized in internal functions. We only ever need to generate a single instance in this function, so there is no need for multi-instance support.
Just a small sanity check to at least exercise the functionality and verify it does something sensible.
7cbe152 to
02d6578
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The Pareto problem generation re-used the same centroid for 10 times (which seems to be a bug) and generated invalid elements when
n_instanceswas not a multiple of 10. This tries to fix these problems an adds some documentation on the things @kiudee cleared up for me. This is a result of #164 (comment).How Has This Been Tested?
Ran the new test, relying on CI for the rest.
Types of changes
Checklist: