From b5dd6bee71618a93c80e677bbe6425f8e7d02b9c Mon Sep 17 00:00:00 2001 From: Liwei Song Date: Thu, 10 Dec 2020 18:06:08 -0500 Subject: [PATCH] edit the summary string for privacy risk scores --- .../privacy/membership_inference_attack/data_structures.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py b/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py index f915f55..d710671 100644 --- a/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py +++ b/tensorflow_privacy/privacy/membership_inference_attack/data_structures.py @@ -566,7 +566,7 @@ class SingleRiskScoreResult: """ meaningful_threshold_list, precision_list, recall_list = self.attack_with_varied_thresholds(threshold_list) summary = [] - summary.append('\nPrivacy risk score analysis over slice: \"%s\"' % + summary.append('Privacy risk score analysis over slice: \"%s\"' % str(self.slice_spec)) for i in range(len(meaningful_threshold_list)): summary.append(' with %.5f as the threshold on privacy risk score, the precision-recall pair is (%.5f, %.5f)' % @@ -589,6 +589,7 @@ class RiskScoreResults: single_summary = single_result.collect_results() for line in single_summary: summary.append(line) + summary.append('\n') return '\n'.join(summary)