edit the summary string for privacy risk scores

This commit is contained in:
Liwei Song 2020-12-10 18:06:08 -05:00
parent e72ff861a1
commit b5dd6bee71

View file

@ -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)