Merge pull request #11688 from jacquesqiao/fix-auc-1

fix metrics.Auc
port
Qiao Longfei 7 years ago committed by GitHub
commit e0f65642d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -596,12 +596,12 @@ class Auc(MetricBase):
tp, fn, tn, fp = 0, 0, 0, 0
for i, lbl in enumerate(labels):
if lbl:
if predictions[i, 1] >= thresh:
if preds[i, 1] >= thresh:
tp += 1
else:
fn += 1
else:
if predictions[i, 1] >= thresh:
if preds[i, 1] >= thresh:
fp += 1
else:
tn += 1

Loading…
Cancel
Save