Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types#57
Draft
endolith wants to merge 10 commits into
Draft
Weber vote-for-or-against-k: IC-coupled ballots (default) + optional uniform types#57endolith wants to merge 10 commits into
endolith wants to merge 10 commits into
Conversation
…ess table - Maximize eff_vote_for_or_against_k over integer k in 1..floor(m/2) instead of rounding alpha*m (differs e.g. at m=91). - effectiveness_table: add Best Vote-for-or-against-k from closed form; document that Merrill-style Monte Carlo does not apply to that column. - Fix weber_1977_expressions __main__ table construction and infinity row. Co-authored-by: endolith <endolith@gmail.com>
Implement vote_for_or_against_k as +1 on each voter's k best utilities and -1 on their k worst (disjoint when k <= n//2), matching Monte Carlo SUE to Weber's effectiveness integrals. Wire weber_1977_effectiveness_table to combined_approval with best k; add regression checks in test_cases and test_strategies. Co-authored-by: endolith <endolith@gmail.com>
Implement literal type draw (uniform k-subset, then +1 on S or -1 on S), independent of utilities; remove incorrect simultaneous top/bottom rule and MC-vs-theory asserts. Document possible gap vs dashed eff_* in effectiveness table. Co-authored-by: endolith <endolith@gmail.com>
Default vote_for_or_against_k uses utility top-k (+1) and bottom-k (-1), which matches Cowles DP 498 effectiveness in Merrill-style Monte Carlo. Add strategy='uniform_types' for the utility-independent literal type draw. Update Weber example docs and add Monte Carlo regression test. Co-authored-by: endolith <endolith@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #57 +/- ##
==========================================
+ Coverage 96.31% 96.44% +0.13%
==========================================
Files 19 19
Lines 489 507 +18
==========================================
+ Hits 471 489 +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 Sentry. 🚀 New features to boost your workflow:
|
…nst-k Co-authored-by: endolith <endolith@gmail.com>
vote_for_or_against_k is utility-ranked only; vote_for_or_against_k_uniform_types is the finite-type draw. Remove strategy keyword. Update Weber example docs and tests to match repo conventions. Co-authored-by: endolith <endolith@gmail.com>
Single utility-ranked implementation remains; drop redundant export and tests. Co-authored-by: endolith <endolith@gmail.com>
Weber's for/against types are one k-set per ballot; vote against targets least-liked candidates, not favorites. Remove MC-vs-closed-form regression test; docstrings no longer claim Table 19 match for finite simulation. Co-authored-by: endolith <endolith@gmail.com>
…ple vs closed form Hypothesis checks k approvals XOR k rejections per voter and ~50% split with large n; deterministic large-sample coin check. Example doc states solid curves are not asserted to match Weber dashed formulas for VOA-k. Co-authored-by: endolith <endolith@gmail.com>
Monte Carlo SUE vs closed form for repo strategy, simultaneous +/-, same-top XOR, uniform subset, and vote-for-k baseline; CLI n_voters/n_elections. Co-authored-by: endolith <endolith@gmail.com>
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
vote_for_or_against_k: fair coin:+1on bestkor−1on worstk(not both).examples/weber_voa_k_ballot_variants_benchmark.py: CLI benchmark comparing Monte Carlo SUE toeff_vote_for_or_against_kfor several ballot interpretations (repo rule, simultaneous ±, same-top XOR, uniform subset, vote-for-k baseline).Running the benchmark
From repo root:
PYTHONPATH=. python3 examples/weber_voa_k_ballot_variants_benchmark.pyOptions:
--n-voters,--n-elections,--seed.Testing
pytest -q --no-cov(221 passed).