rtkfan / relative-placement

Aggregate rankings based on the Relative Placement method
0 stars 1 forks source link

tiebreaks() question #1

Open gregbo opened 3 years ago

gregbo commented 3 years ago

Is the showdown feature (as a result of a "perfect tie", explained in 6 Steps to Understanding Relative Placement) implemented? I created the following test data and ran your program on it:

judge,candidate,rank Craig,Lance & MaryAnn,1 Craig,Mario & Carmen,3 Craig,Kelly & Dominic,2 Annie,Lance & MaryAnn,2 Annie,Mario & Carmen,1 Annie,Kelly & Dominic,3 Jack,Lance & MaryAnn,3 Jack,Mario & Carmen,2 Jack,Kelly & Dominic,1 Skippy,Lance & MaryAnn,2 Skippy,Mario & Carmen,1 Skippy,Kelly & Dominic,3 Phil,Lance & MaryAnn,1 Phil,Mario & Carmen,2 Phil,Kelly & Dominic,3

Since Lance & MaryAnn and Mario & Carmen are perfectly tied, the pairwise tiebreaker should be invoked. Mario & Carmen should be the winning couple, since three of the five judges ranked them above Lance & MaryAnn.

rtkfan commented 3 years ago

Hi! You'll notice that no tiebreak functionality is implemented yet -- that includes all of the steps that happen before a showdown (summing of ordinals, going to the next position). If you've got the appetite I'd welcome a PR for this!

gregbo commented 3 years ago

OK, understood. I was able to verify this using the following test data:

judge,candidate,rank Mark,Jordan & Tatiana,5 Mark,Myles & Tessa,2 Mark,Susan & Gary,3 Mark,Sarah & Kyle,4 Mark,Lee & Fabienne,1 Kelly,Jordan & Tatiana,2 Kelly,Myles & Tessa,3 Kelly,Susan & Gary,4 Kelly,Sarah & Kyle,5 Kelly,Lee & Fabienne,1 John,Jordan & Tatiana,1 John,Myles & Tessa,4 John,Susan & Gary,5 John,Sarah & Kyle,3 John,Lee & Fabienne,2 Yvonne,Jordan & Tatiana,4 Yvonne,Myles & Tessa,5 Yvonne,Susan & Gary,2 Yvonne,Sarah & Kyle,1 Yvonne,Lee & Fabienne,3 Martin,Jordan & Tatiana,2 Martin,Myles & Tessa,1 Martin,Susan & Gary,5 Martin,Sarah & Kyle,3 Martin,Lee & Fabienne,4

It produced the following output:

working copy size 75 Determining rank 1 looking at judge rankings 1 or better working copy size 75 Determining rank 1 looking at judge rankings 2 or better ['Jordan & Tatiana', 'Lee & Fabienne'] working copy size 45 Determining rank 3 looking at judge rankings 3 or better ['Jordan & Tatiana', 'Lee & Fabienne', 'Myles & Tessa', 'Sarah & Kyle'] working copy size 15 Determining rank 5 looking at judge rankings 5 or better ['Jordan & Tatiana', 'Lee & Fabienne', 'Myles & Tessa', 'Sarah & Kyle', 'Susan & Gary']

Lee & Fabienne should be the winning couple, because they are tied with Jordan & Tatiana for majorities of ranks 1-2, and they have a lower sum of placements within those ranks (4 vs 5).

Unfortunately, my time is limited, so I won't be able to submit any PRs for this issue in the foreseeable future. (However, I just submitted a PR for a minor suggestion that would make testing easier.) Some people I know have an interest in Python and RP, so I will point them to your repo, and see if they are able to contribute.