def get_sanity_check_counter():
'''
Provide a dictionary with the standard sanity check counter values.
It is typically used like:
counters['ZeroCount'] = get_sanity_check_counter()
All of these values are unused, except for:
bins:
- [-inf, inf] (a long counter is appended by SecureCounters,
it should only ever have blinding values added)
estimated_value: 0.0 (TODO: used for checking if stats have changed)
sigma: 0.0 (used for adding noise, 0.0 means no noise is added)
'''
sanity_check = {}
sanity_check['bins'] = []
single_bin = [float('-inf'), float('inf')]
sanity_check['bins'].append(single_bin)
sanity_check['sensitivity'] = 0.0
sanity_check['estimated_value'] = 0.0
sanity_check['sigma'] = 0.0
sanity_check['epsilon'] = 0.0
sanity_check['expected_noise_ratio'] = 0.0
return sanity_check
评论列表
文章目录