diff --git a/research/pate_2018/__pycache__/core.cpython-36.pyc b/research/pate_2018/__pycache__/core.cpython-36.pyc new file mode 100644 index 0000000..2f2e72f Binary files /dev/null and b/research/pate_2018/__pycache__/core.cpython-36.pyc differ diff --git a/research/pate_2018/__pycache__/smooth_sensitivity.cpython-36.pyc b/research/pate_2018/__pycache__/smooth_sensitivity.cpython-36.pyc new file mode 100644 index 0000000..c5279ae Binary files /dev/null and b/research/pate_2018/__pycache__/smooth_sensitivity.cpython-36.pyc differ diff --git a/research/pate_2018/smooth_sensitivity.py b/research/pate_2018/smooth_sensitivity.py index 4bf399e..3525bab 100644 --- a/research/pate_2018/smooth_sensitivity.py +++ b/research/pate_2018/smooth_sensitivity.py @@ -261,7 +261,7 @@ def compute_local_sensitivity_bounds_threshold(counts, num_teachers, threshold, """Computes a list of max-LS-at-distance-d for the threshold mechanism.""" def _compute_ls(v): - ls_step_up, ls_step_down = None, None + ls_step_up, ls_step_down = float("-inf"), float("-inf") if v > 0: ls_step_down = abs(rdp_list[v - 1] - rdp_list[v]) if v < num_teachers: @@ -273,7 +273,7 @@ def compute_local_sensitivity_bounds_threshold(counts, num_teachers, threshold, ls = np.zeros(num_teachers) for d in range(max(cur_max, num_teachers - cur_max)): - ls_up, ls_down = None, None + ls_up, ls_down = float("-inf"), float("-inf") if cur_max + d <= num_teachers: ls_up = _compute_ls(cur_max + d) if cur_max - d >= 0: