diff options
| author | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-02-04 14:05:47 -0500 |
|---|---|---|
| committer | jeanpouget-abadie <jean.pougetabadie@gmail.com> | 2015-02-04 14:05:47 -0500 |
| commit | 71cf5d890df71701d0fd60f1907a1cc63b508cbf (patch) | |
| tree | 9acbdf7ee08d1ceba8b15e4eac169680ab77bb82 /src/algorithms.py | |
| parent | a819813ca6c310d84a52de51e7bc49ea8dd8a726 (diff) | |
| download | cascades-71cf5d890df71701d0fd60f1907a1cc63b508cbf.tar.gz | |
adding precision_recall curve
Diffstat (limited to 'src/algorithms.py')
| -rw-r--r-- | src/algorithms.py | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
