From 71cf5d890df71701d0fd60f1907a1cc63b508cbf Mon Sep 17 00:00:00 2001 From: jeanpouget-abadie Date: Wed, 4 Feb 2015 14:05:47 -0500 Subject: adding precision_recall curve --- src/algorithms.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/algorithms.py') diff --git a/src/algorithms.py b/src/algorithms.py index fb0a37d..51f57bf 100644 --- a/src/algorithms.py +++ b/src/algorithms.py @@ -70,6 +70,7 @@ def correctness_measure(G, G_hat, print_values=True): precision = 1. * tp / (tp + fp) recall = 1. * tp / (tp + fn) f1_score = 2.* tp / (2 * tp + fp + fn) + fall_out = 1. * fp / (fp + tn) if print_values: print("False Positives: {}".format(fp)) @@ -80,6 +81,7 @@ def correctness_measure(G, G_hat, print_values=True): print("Precision: {}".format(precision)) print("Recall: {}".format(recall)) print("F1 score: {}".format(f1_score)) + print("Fall Out: {}".format(fall_out)) return fp, fn, tp, tn -- cgit v1.2.3-70-g09d2