Allocated Score: Difference between revisions

Content added Content deleted
(Added python code to be super clear)
(→‎Python Implementation: Add function to ensure the ballots are in the correct range)
Line 67: Line 67:
cand_df.loc[cand_df[w] == split_point, 'weights'] = cand_df.loc[cand_df[w] == split_point, 'weights'] * (1 - spent_value)
cand_df.loc[cand_df[w] == split_point, 'weights'] = cand_df.loc[cand_df[w] == split_point, 'weights'] * (1 - spent_value)
ballot_weight = cand_df['weights']
ballot_weight = cand_df['weights'].clip(0.0,1.0)


return winner_list
return winner_list