-
Notifications
You must be signed in to change notification settings - Fork 60
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
Selections refactor #41
base: master
Are you sure you want to change the base?
Conversation
d06fef1
to
340e307
Compare
Separated out this change from others so it may be considered independently. |
340e307
to
3c84d80
Compare
I 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 just uniform, 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 a uniform 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
to
da4ca8f
Compare
da4ca8f
to
ac4398e
Compare
71d4d34
to
b925a2c
Compare
f8f9fc4
to
cc7ffe2
Compare
12d8cee
to
b0f5477
Compare
dd6579c
to
c81f2c9
Compare
091f38a
to
cf3f2fb
Compare
Refactored selections.jl to fix some bugs (including issue #40) and improve clarity.