Navigation

    Voting Theory Forum

    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    Threshold MES

    Proportional Representation
    4
    27
    2628
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User @Marcus Ogren last edited by A Former User

      @marcus-ogren said in Threshold MES:

      I can't think of an example off the top of my head where the model of having individual utilities of each candidate and maximizing the sum over all the winners breaks down.

      Not to start bikeshedding, but

      Red (33%): A5 B0 C0 D2
      Blue (33%): A0 B5 C0 D2
      Green (33%): A0 B0 C5 D2

      To elect 3 candidates. To me, clearly ABC is the correct committee, and this is what TEA elects. However, with linearly additive utilities, one might be fooled into thinking that DDD is the correct committee (in fact, it Pareto dominates ABC !), and this is what AS or SSS or MES elects (with or without runoffs).

      Otherwise yes I think it seems we both understand each other's viewpoint and still disagree; this is ok, such is the burden of judgement, as Rawls would put it.

      M 1 Reply Last reply Reply Quote 1
      • M
        Marcus Ogren @Guest last edited by

        @andy-dienes I agree with you about that example. That said, if there were 6 winners I'd go with ABCDDD, and if they all gave D a three instead of a two I'd prefer DDD to ABC. Yeah, I think we understand one another's positions pretty well now.

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User last edited by

          Added a Julia implementation to the electowiki page. If people want it in Python I can translate.

          K 1 Reply Last reply Reply Quote 0
          • K
            Keith Edmonds @Guest last edited by

            @andy-dienes said in Threshold MES:

            Added a Julia implementation to the electowiki page. If people want it in Python I can translate.

            My preference is python with heavy use of the pandas library. This should help it be short an clean. Or at leas shorter than what you have there. We do not really want production code but a very precise definition.

            ? 1 Reply Last reply Reply Quote 0
            • ?
              A Former User @Keith Edmonds last edited by A Former User

              @keith-edmonds DataFrames.jl is essentially the same as pandas so unfortunately I do not think the logic can be made appreciably shorter (without golfing the code and making it harder to follow)

              There are some pieces I could cut though if you just want it visually shorter

              1. cut whitespace & comments
              2. remove the isapprox checks---these in theory should not be necessary, but without them you can get bad results when some candidate gets precisely one quota (because of floating point imprecision)
              3. remove the option to allow clones
              4. remove the example with Tennessee capital cities

              I'll put a Python version up and you let me know which components if any should be cut

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User last edited by A Former User

                Ok, I added a Python version as well. As requested, I made as liberal use of Pandas functionality as I could. Personally, I find the more spelled-out implementation easier to follow, but pd magic is undeniably concise in some places. It's probably a good idea regardless to have two very different implementations---this way we can validate them against each other to find errors.

                K 1 Reply Last reply Reply Quote 0
                • K
                  Keith Edmonds @Guest last edited by

                  @andy-dienes Awesome. Pandas definitely can make things concise if done right. There are lots of functions.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post