There was an error while loading. Please reload this page.
1 parent d9a7349 commit 316aa8dCopy full SHA for 316aa8d
2 files changed
syndiffix/tree.py
@@ -117,7 +117,8 @@ def noisy_count(self) -> int:
117
for row in self._matching_rows():
118
row_counter.add(self.context.pid_data[row])
119
120
- min_count = anon_context.anonymization_params.low_count_params.low_threshold
+ # min_count = anon_context.anonymization_params.low_count_params.low_threshold
121
+ min_count = 1
122
self._noisy_count_cache = max(row_counter.noisy_count(anon_context), min_count)
123
124
return self._noisy_count_cache
tests/clustering/test_measures.py
@@ -20,15 +20,12 @@ def test_measure_all() -> None:
20
np.array(
21
[
22
[1.00, 0.2, 0.15, 0.02, 0.05],
23
- [0.2, 1.00, 0.18, 0.02, 0.05],
+ [0.2, 1.00, 0.18, 0.02, 0.06],
24
[0.15, 0.18, 1.00, 0.04, 0.07],
25
- [0.02, 0.02, 0.04, 1.00, 0],
26
- [0.05, 0.05, 0.07, 0, 1.00],
+ [0.02, 0.02, 0.04, 1.00, 0.01],
+ [0.05, 0.06, 0.07, 0.01, 1.00],
27
]
28
),
29
)
30
31
- assert np.array_equal(
32
- np.round(measures.entropy_1dim, 3),
33
- np.array([16.042, 15.886, 5.398, 0.118, 1.350]),
34
- )
+ assert np.array_equal(np.round(measures.entropy_1dim, 3), np.array([9.214, 9.207, 5.160, 0.118, 1.350]))
0 commit comments