From 1b0d709e81b5d469246fdffe2b8113c2f2940401 Mon Sep 17 00:00:00 2001 From: "a.croix" <croix.alexandre@gmail.com> Date: Wed, 13 Mar 2019 09:34:56 +0100 Subject: [PATCH] Correction in computeRocPoints methods --- src/main/java/be/cylab/java/roc/Main.java | 3 +++ src/main/java/be/cylab/java/roc/Roc.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/be/cylab/java/roc/Main.java b/src/main/java/be/cylab/java/roc/Main.java index 310eb4c..3825f3b 100644 --- a/src/main/java/be/cylab/java/roc/Main.java +++ b/src/main/java/be/cylab/java/roc/Main.java @@ -49,6 +49,9 @@ public class Main { Roc roc = new Roc(solutions, true_alert); System.out.println(roc.computeAUC()); + List<RocCoordinates> rocCoordinates = roc.computeRocPoints(); + Utils.storeRocCoordinatesInCSVFile(rocCoordinates, "/home/alex/Desktop/Test.csv"); + } } diff --git a/src/main/java/be/cylab/java/roc/Roc.java b/src/main/java/be/cylab/java/roc/Roc.java index 233421f..5967e58 100644 --- a/src/main/java/be/cylab/java/roc/Roc.java +++ b/src/main/java/be/cylab/java/roc/Roc.java @@ -38,7 +38,7 @@ public class Roc { roc_points.add(new RocCoordinates(true_detection, false_alarm)); previous_score = point.getScore(); } - if (point.getScore() == 1) { + if (point.isTrueAlert()) { true_positive++; } else { false_positive++; -- GitLab