Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types - #57
Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types#57endolith 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
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.