Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
aahaselgrove wants to merge5 commits intowildart:master
base:master
Choose a base branch
Loading
fromaahaselgrove:selections_refactor

Conversation

aahaselgrove
Copy link
Contributor

Refactored selections.jl to fix some bugs (including issue#40) and improve clarity.

@coveralls
Copy link

coveralls commentedSep 30, 2019
edited
Loading

Coverage Status

Coverage decreased (-22.5%) to 77.511% when pulling340e307 on aahaselgrove:selections_refactor intoc7fb224 on wildart:master.

@aahaselgrove
Copy link
ContributorAuthor

Separated out this change from others so it may be considered independently.

@aahaselgrove
Copy link
ContributorAuthor

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.

@wildart
Copy link
Owner

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]

s is the selection function which takes two fittest individuals that are in position 2 & 3 of the first parameters and then selects uniformly from them. I think the better test would be

sort(unique(s([1,2,3],10)))== [2,3]

It wouldn't rely on RNG settings.

@aahaselgrove
Copy link
ContributorAuthor

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.

@wildartwildartforce-pushed themaster branch 3 times, most recently fromf8f9fc4 tocc7ffe2CompareDecember 10, 2021 20:29
@wildartwildartforce-pushed themaster branch 2 times, most recently from12d8cee tob0f5477CompareDecember 20, 2021 02:47
@wildartwildartforce-pushed themaster branch 2 times, most recently fromdd6579c toc81f2c9CompareDecember 29, 2021 01:18
@wildartwildartforce-pushed themaster branch 3 times, most recently from091f38a tocf3f2fbCompareMarch 19, 2022 22:33
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@aahaselgrove@coveralls@wildart

[8]ページ先頭

©2009-2025 Movatter.jp