This commit is contained in:
Manos Katsomallos 2022-01-07 06:17:18 +01:00
parent 944652f380
commit 36a45abb82
5 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ def exponential(seq, lmdks, epsilon):
# Otherwise # Otherwise
bgts = np.zeros([len(seq)]) bgts = np.zeros([len(seq)])
if len(seq) != len(lmdks): if len(seq) != len(lmdks):
# Find worst case regural point # Find worst case regular point
p_sel = 0 p_sel = 0
for p in seq: for p in seq:
if not np.any(lmdks[:] == p): if not np.any(lmdks[:] == p):
@ -190,7 +190,7 @@ def linear_zero(seq, lmdks, epsilon):
bgts - The privacy budget allocation. bgts - The privacy budget allocation.
''' '''
bgts = np.zeros([len(seq)]) bgts = np.zeros([len(seq)])
# Find worst case regural point # Find worst case regular point
p_sel = 0 p_sel = 0
for p in seq: for p in seq:
if not np.any(lmdks[:] == p): if not np.any(lmdks[:] == p):
@ -227,7 +227,7 @@ def linear(seq, lmdks, epsilon):
# Fallback to uniform if zero or max landmarks # Fallback to uniform if zero or max landmarks
if len(lmdks) == 0 or len(lmdks) == len(seq): if len(lmdks) == 0 or len(lmdks) == len(seq):
return uniform(seq, lmdks, epsilon) return uniform(seq, lmdks, epsilon)
# Find worst case regural point # Find worst case regular point
p_sel = 0 p_sel = 0
for p in seq: for p in seq:
if not np.any(lmdks[:] == p): if not np.any(lmdks[:] == p):

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.