Skip to content

Latest commit

 

History

History
45 lines (26 loc) · 827 Bytes

demo_dataGenerator.md

File metadata and controls

45 lines (26 loc) · 827 Bytes

Usage of dataGenerator

Import all functions in dataGenerator

from dataGenerator import *

Initialization

Step 1: Specify the input population with size of user and protected group
user_N = 100 
pro_N = 50
Step 2: Specify the input mixing proportion of generating algorithm
mixing_proportion = 0.5
Step 3: Generate a random ranking and position of protected group to initiate the algorithm
test_ranking = [x for x in range(user_N)]
pro_index = [x for x in range(pro_N)]

Test ranking-generator algorithm

output_ranking = generateUnfairRanking(test_ranking, pro_index, mixing_proportion)
print "Successfully generate a ranking with input setting!"
Successfully generate a ranking with input setting!