@@ -140,8 +140,24 @@ def test_gaussian_keep_and_return_noised_value(
140
140
100 ,
141
141
[0 , 0 , 0.12818308050524607 , 1 ],
142
142
),
143
- ([10 , 99 , 109 , 200 ], "laplace" , 1 , 1e-5 , 1 , 100 , [0 , 0 , 0.08103083927575383 , 1 ]),
144
- ([10 , 99 , 109 , 200 ], "gaussian" , 1 , 1e-5 , 1 , 100 , [0 , 0 , 0.017845473615190732 , 1 ]),
143
+ (
144
+ [10 , 99 , 109 , 200 ],
145
+ "laplace" ,
146
+ 1 ,
147
+ 1e-5 ,
148
+ 1 ,
149
+ 100 ,
150
+ [0 , 0 , 0.08103083927575383 , 1 ],
151
+ ),
152
+ (
153
+ [10 , 99 , 109 , 200 ],
154
+ "gaussian" ,
155
+ 1 ,
156
+ 1e-5 ,
157
+ 1 ,
158
+ 100 ,
159
+ [0 , 0 , 0.017845473615190732 , 1 ],
160
+ ),
145
161
],
146
162
)
147
163
def test_pre_thresholding (
@@ -152,7 +168,7 @@ def test_pre_thresholding(
152
168
delta ,
153
169
max_partitions_contributed ,
154
170
pre_threshold ,
155
- expected_probs
171
+ expected_probs ,
156
172
):
157
173
partition_selector = create_partition_strategy (
158
174
strategy , epsilon , delta , max_partitions_contributed , pre_threshold
@@ -175,4 +191,6 @@ def test_pre_thresholding(
175
191
assert sum (sims ) == 0
176
192
else :
177
193
pred_prob_of_keep = np .mean (sims )
178
- assert pred_prob_of_keep == pytest .approx (expected_prob , ACCURACY_THRESHOLD )
194
+ assert pred_prob_of_keep == pytest .approx (
195
+ expected_prob , ACCURACY_THRESHOLD
196
+ )
0 commit comments