update privacy risk score code

This commit is contained in:
Liwei Song 2020-12-16 16:01:29 -05:00
parent a4d108f270
commit 59bccb3a82

View file

@ -471,7 +471,7 @@ class SingleRiskScoreResult:
precision_list = [] precision_list = []
recall_list = [] recall_list = []
meaningful_threshold_list = [] meaningful_threshold_list = []
max_risk_score = max(train_risk_scores.max(), test_risk_scores.max()) max_risk_score = max(self.train_risk_scores.max(), self.test_risk_scores.max())
for threshold in threshold_list: for threshold in threshold_list:
if threshold <= max_risk_score: if threshold <= max_risk_score:
idx = np.argwhere(thresholds>=threshold)[-1][0] idx = np.argwhere(thresholds>=threshold)[-1][0]