Example #1
0
eps = args.eps
rep = args.rep
seed = args.seed
if seed is not None:
    np.random.seed(seed)
print(experiment_name)
print('n={}, k={}, eps={}, rep={}, seed={}'.format(n,k,eps,rep,seed))
conf = OrderedDict()
conf['n']=n
conf['eps'] = eps
conf['rep']=rep
conf['seed'] =seed

modes = ['ind', 'uni', 'fdiff', 'fmax', 'fsum']
W_name = ['adult', 'age1', 'age2', 'age3']
W_lst = [census.__adult(), census.__age1(), census.__age2(), census.__age3()]
c = np.random.choice(len(W_lst))
Ws = [W_lst[c]]
Wn = [W_name[c]]
res = error_calc(Ws, Ws, n, 1/k*eps, modes, rep)
analysis = pd.DataFrame()
result = pd.DataFrame.from_dict(res, orient='index')
result = result.set_index(result.index+'_1')
results = result
out_dict = dict()
out_dict['res_1'] = res
res_prev = res

for j in range(2,k+1):
    outs = []
    index =[]
Example #2
0
conf['k'] = k
conf['eps'] = eps
conf['rep'] = rep
conf['seed'] = seed
conf['t'] = t
modes = [
    'ind', 'iden', 'uni', 'fdiff', 'fmax', 'fsum', 'buc_eq', 'buc_con',
    'buc_qeq', 'buc_qsd'
]
W_name = np.array([
    'adult', 'age1', 'age2', 'age3', 'Total', 'Total', 'Identity', 'Prefix',
    'Prefix'
])
W_lst = np.array([
    census.__adult(),
    census.__age1(),
    census.__age2(),
    census.__age3(),
    workload.Total(n),
    workload.Total(n),
    workload.Identity(n),
    workload.Prefix(n),
    workload.Prefix(n)
])
A_lst = strategy_comp(W_lst, n, rep)
results = []
names = []
total_errors = pd.DataFrame()
mean_ratio_errors = pd.DataFrame()
max_ratio_errors = pd.DataFrame()
min_ratio_errors = pd.DataFrame()
Example #3
0
seed = args.seed
t = args.t
if seed is not None:
    np.random.seed(seed)
print(experiment_name)
print('n={}, k={}, eps={}, rep={}, seed={}, t={}'.format(n,k,eps,rep,seed,t))
conf = OrderedDict()
conf['n']=n
conf['k']=k
conf['eps'] = eps
conf['rep']=rep
conf['seed'] =seed
conf['t'] = t
modes = ['ind', 'iden', 'uni', 'fdiff', 'fmax', 'fsum', 'buc_eq', 'buc_con', 'buc_qeq', 'buc_qsd']
W_name = np.array(['adult', 'age1', 'age2', 'age3', 'Total', 'Identity'])
W_lst = np.array([census.__adult(), census.__age1(), census.__age2(), census.__age3(), workload.Total(n), workload.Identity(n)])
A_lst = strategy_comp(W_lst, n, rep)
results = []
names = []
total_errors = pd.DataFrame()
mean_ratio_errors = pd.DataFrame()
max_ratio_errors = pd.DataFrame()
min_ratio_errors = pd.DataFrame()
max_distances = pd.DataFrame()
min_distances = pd.DataFrame()
gini_coefficients = pd.DataFrame()
mean_idenratio_errors = pd.DataFrame()
max_idenratio_errors = pd.DataFrame()
min_idenratio_errors = pd.DataFrame()
iden_gini_coefficients = pd.DataFrame()
for i in range(t):