[EM] Score Sorted Margins + Sequential Monroe Voting (python code)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[EM] Score Sorted Margins + Sequential Monroe Voting (python code)

Ted Stern
There's been some discussion on the Election Science Forum about different methods for doing PR with 0 to 5 score ballots.

https://forum.electionscience.org/t/wolf-committee-results/519/90

One of the methods discussed there is called Sequential Monroe Voting.


The motivation behind this method is a paper by B. Monroe back in the '90s, but the gist of it is that each candidate is measured by their total score within only the top quota of votes, and then one quota of weight is removed from ballots that score the winner at or above the quota threshold rating.

Parker Friedland's original statement of the method rescales ballots strictly above the threshold rating to zero, and for that portion of the quota-weight still remaining, reweights the at-threshold rating ballots accordingly.

While this technique follows the motives of Monroe's paper, I feel that it gives voters an incentive to give lower ratings to popular candidates in their faction.  But reweighting all ballots with a uniform factor (as in ER-Bucklin quota threshold approval PR) takes no account of the strength of support.

As a compromise, I propose the following:

Given, for a given candidate,

S[r] = weighted total of ballots giving candidate a score of r

TS[r] = maxscore * S[maxscore] + ... + r * S[r], the total score down to rating r

TA[r] = S[maxscore] + ... + S[r], the total approval from max down to rating r

R = maximum r at which TA[r] is >= quota

Then if maxscore * quota <= TS[R], reweight each ballot scoring the seat winner at rate r >= R using the following factor:

Factor[r] = 1.0 - r * maxscore * quota / TS[R]

Otherwise, set M to maxscore, Q to quota, and TT to TS[R].

Factor[1 to Maxscore] initialized to 1.0

for r = Maxscore to R in descending order,
    if M * Q > T,
        Factor[r] = 0.0
        M = r - 1
        TT = TT - M * TS[r]
        Q = Q - TS[r]
     else:
         Factor[r] = 1.0 - r * M * Q / TT

When the quota is a small enough fraction of the seat winner's normalized score, ballots are reweighted in direct proportion to the score at and above R. But if the top quota score is too small, ballots with high rates above R are deweighted completely, until the remaining portion to deweight is small enough for proportional reweighting again.

Just to clarify, it is important to understand that TS[R] is not the same as Sequential Monroe Voting's top quota score -- the latter is defined as 

TopQuotaScore = TS[R] - R * (TA[R] - quota)

Using this reweighting strategy, I wrote some code to implement Sequential Monroe Voting. For comparison, I combined this method with Score Sorted Margins, using SMV's top quota score as the seeding and marginal metric.

You can find this code as ssmpr.py in https://github.com/dodecatheon/approva-sorted-margins/

Either SMV or SSM is Droop proportional when using the Hagenbach-Bischoff quota (Total votes / Num seats - 1), though I think the Hare quota is preferable.

----
Election-Methods mailing list - see https://electorama.com/em for list info
Reply | Threaded
Open this post in threaded view
|

Re: [EM] Score Sorted Margins + Sequential Monroe Voting (python code)

Rob Lanphier
Hi Ted,

This looks really interesting.  I haven't (yet) followed the details
of all of this, but I *may* dig into this at some point.

BTW, you have a typo in the URL to the Github repo you cited (with
ssmpr.py in it)  The correct URL:
https://github.com/dodecatheon/approval-sorted-margins/

At *some* point, I would love to build a language-agnostic test suite
for election methods. I'm pretty comfortable with Python, but I also
have dreams of reviving Electowidget in Lua and hosting it on
electowiki.org (and I have many ideas I could keep writing about here
but I'll try not to threadjack).

Ted, I think there's an email that you sent a year or so ago that I
*meant* to respond to.  My backlog of emails and wiki edits and forum
postings that I want to make is pretty long.  I hope you get traction
with ^that approval-sorted-margins project.  Like I said: interesting.

Rob
----
Election-Methods mailing list - see https://electorama.com/em for list info
Reply | Threaded
Open this post in threaded view
|

Re: [EM] Score Sorted Margins + Sequential Monroe Voting (python code)

Ted Stern
Thanks for your comments, Rob!

I don't recall what I was writing about a year or two ago, but it was probably about your approval primary idea.

If one were advocating for voting method improvements, Approval Voting would certainly be a great place to start, and my ssmpr.py code could be used for both single and multi-winner with a 0 to 1 range ballot.

With either Approval or Score ballots, I think one reasonable way to do a primary would be to use SSMPR to run several different elections on the same ballots:

Single-winner plus runner-up
Two winners (quota = 50%)
Three winners (quota = 33%)

and include all those candidates on the general election ballot.

In the worst case, this would put 7 candidates on the general ballot, but more likely 3 to 5, since there would likely be some overlap between the three sub-elections.  In a scenario with two larger parties having 40% and 35% strength, the 3-seat multiwinner count would ensure that any alternative party with more than 7% strength (or appeal to factions within the larger parties) would have a candidate on the ballot.

On Fri, Jun 5, 2020 at 6:42 PM Rob Lanphier <[hidden email]> wrote:
Hi Ted,

This looks really interesting.  I haven't (yet) followed the details
of all of this, but I *may* dig into this at some point.

BTW, you have a typo in the URL to the Github repo you cited (with
ssmpr.py in it)  The correct URL:
https://github.com/dodecatheon/approval-sorted-margins/

At *some* point, I would love to build a language-agnostic test suite
for election methods. I'm pretty comfortable with Python, but I also
have dreams of reviving Electowidget in Lua and hosting it on
electowiki.org (and I have many ideas I could keep writing about here
but I'll try not to threadjack).

Ted, I think there's an email that you sent a year or so ago that I
*meant* to respond to.  My backlog of emails and wiki edits and forum
postings that I want to make is pretty long.  I hope you get traction
with ^that approval-sorted-margins project.  Like I said: interesting.

Rob

----
Election-Methods mailing list - see https://electorama.com/em for list info
Reply | Threaded
Open this post in threaded view
|

Re: [EM] Score Sorted Margins + Sequential Monroe Voting (python code)

Ted Stern
In reply to this post by Rob Lanphier
After a bit of thought, I modified ssmpr.py to use a different sort of scaled reweighting.

first, let's define some terms:

S[r] = ballots giving the seat winner a score rating of r

v = the rating at which S[v] + S[v+1] + ... S[MAX] is greater than the quota

TS[v,mm] = S[v] * (mm - MAX + v) + ... + S[MAX] * mm        (a total of MAX-v terms)

Then, if   MAX * quota is greater than TS[v,mm=MAX], we increment mm until we find a new max rating for which 

mm * quota < TS[v,mm]

Then the reweighting factors for ratings r >=v are

Factor[r] = 1 - (r + mm - MAX) * Quota / TS[v,mm]

This treats the scores a bit more like Borda ranking, automatically rescaling the ballot in order to get proportional reweighting.

I don't have any mathematical justification for one reweighting method over another, other than the sense that it "feels right" to reweight in some proportion to the rating when you are using a rating ballot, and if you fully deweight all ballots over the threshold rating, you create an incentive for Hylland free riding.


On Fri, Jun 5, 2020 at 6:42 PM Rob Lanphier <[hidden email]> wrote:
Hi Ted,

This looks really interesting.  I haven't (yet) followed the details
of all of this, but I *may* dig into this at some point.

BTW, you have a typo in the URL to the Github repo you cited (with
ssmpr.py in it)  The correct URL:
https://github.com/dodecatheon/approval-sorted-margins/

At *some* point, I would love to build a language-agnostic test suite
for election methods. I'm pretty comfortable with Python, but I also
have dreams of reviving Electowidget in Lua and hosting it on
electowiki.org (and I have many ideas I could keep writing about here
but I'll try not to threadjack).

Ted, I think there's an email that you sent a year or so ago that I
*meant* to respond to.  My backlog of emails and wiki edits and forum
postings that I want to make is pretty long.  I hope you get traction
with ^that approval-sorted-margins project.  Like I said: interesting.

Rob

----
Election-Methods mailing list - see https://electorama.com/em for list info