From 2267c3cf965e4a2bc9ac405aa10472d25280393f Mon Sep 17 00:00:00 2001
From: Nikolai Hartmann <nikolai.hartmann@gmx.de>
Date: Tue, 20 Nov 2018 09:11:22 +0100
Subject: [PATCH] adjust compare.py

---
 compare.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compare.py b/compare.py
index cfe29df..98b2fdb 100755
--- a/compare.py
+++ b/compare.py
@@ -43,7 +43,7 @@ def overlay_ROC(filename, *projects, **kwargs):
     colors = prop_cycle.by_key()['color']
 
     for p, color in zip(projects, colors):
-        fpr, tpr, threshold = roc_curve(p.y_test, p.scores_test, sample_weight = p.w_test)
+        fpr, tpr, threshold = roc_curve(p.l_test, p.scores_test, sample_weight = p.w_test)
         fpr = 1.0 - fpr
         try:
             roc_auc = auc(tpr, fpr)
@@ -56,8 +56,8 @@ def overlay_ROC(filename, *projects, **kwargs):
         if plot_thresholds:
             ax2.plot(tpr, threshold, "--", color=color)
         if lumifactor is not None:
-            sumw_b = p.w_test[p.y_test==0].sum()*lumifactor
-            sumw_s = p.w_test[p.y_test==1].sum()*lumifactor
+            sumw_b = p.w_test[p.l_test==0].sum()*lumifactor
+            sumw_s = p.w_test[p.l_test==1].sum()*lumifactor
             ax_abs_b.plot(tpr, (1.-fpr)*sumw_b, alpha=0)
             ax_abs_b.invert_yaxis()
             ax_abs_s.plot(tpr*sumw_s, fpr, alpha=0)
-- 
GitLab