- Notifications
You must be signed in to change notification settings - Fork59
Selections refactor#41
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
coveralls commentedSep 30, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
d06fef1
to340e307
CompareSeparated out this change from others so it may be considered independently. |
340e307
to3c84d80
CompareI can see that this change has broken the new selections.jl tests. Could you please explain what uniformranking is meant to do? My understanding of a 'uniform' selection is that each individual has an equal change of being selected. As the sum of probabilities must equal 1, your current implementation and tests don't make sense to me. |
It isn't justuniform, it is(μ, λ)-uniform ranking which takesμ fittest individuals and selects uniformly from them.λ is a total number of individuals in the population. If you want auniform selection you need to make thatμ = λ. I test the following: s=uniformranking(2)s([1,2,3],2)== [2,3]
sort(unique(s([1,2,3],10)))== [2,3] It wouldn't rely on RNG settings. |
I don't think that removed the dependency on RNG settings, as the selector still chooses randomly. eg. in your example [2, 2] and [3, 3] would be equally valid results. |
3c84d80
toda4ca8f
Compareda4ca8f
toac4398e
Compare71d4d34
tob925a2c
Comparef8f9fc4
tocc7ffe2
Compare12d8cee
tob0f5477
Comparedd6579c
toc81f2c9
Compare091f38a
tocf3f2fb
Compare
Refactored selections.jl to fix some bugs (including issue#40) and improve clarity.