Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types#57
Draft
endolith wants to merge 1 commit into
Draft
Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types#57endolith wants to merge 1 commit into
endolith wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #57 +/- ##
==========================================
+ Coverage 96.37% 96.49% +0.12%
==========================================
Files 17 17
Lines 496 514 +18
==========================================
+ Hits 478 496 +18
Misses 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Rebase onto master after strategies package flatten (PR #47). Add vote_for_or_against_k to elsim/strategies.py: fair coin between +1 on top-k or -1 on bottom-k by utility rank (IC-coupled simulation). - Discrete best_vote_for_or_against_k(m) search in weber_1977_expressions - Effectiveness table example uses combined_approval + best k - Ballot variant benchmark script compares MC SUE vs closed form - Tests for ballot shape, invalid k, and fair-coin distribution Co-authored-by: endolith <endolith@gmail.com>
953507f to
a969ece
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.
Summary
Rebased onto
master(resolves conflicts from strategies package flatten in #47).Adds Weber vote-for-or-against-k simulation support:
vote_for_or_against_kinelsim/strategies.py— each voter flips a fair coin, then either+1on their top-kcandidates by utility or-1on their bottom-k(IC-coupled ballots; ties broken with jitter).best_vote_for_or_against_k(m)— discrete search replacinground(alpha * m); fixes cases likem=91 → k=34.combined_approval.examples/weber_voa_k_ballot_variants_benchmark.py) — compares repo strategy vs simultaneous ±, same-top XOR, uniform subset, and vote-for-k baseline against Weber's closed form.Uniform-type ballots are demonstrated in the benchmark script (
ballot_uniform_subset_coin); the exported API is the utility-ranked coin strategy only.Verification
All 221 tests pass.