aboutsummaryrefslogtreecommitdiffstats
path: root/src/algorithms.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-04 18:39:03 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-04 18:39:03 -0500
commit393cba417046147286001e7317a36db148545bb1 (patch)
tree42f3060330b28d1a7a069da9b70ae0a8b214ef40 /src/algorithms.py
parent0e6ef8ce1055b3a524e2432ffda76f1acceed3d3 (diff)
downloadcascades-393cba417046147286001e7317a36db148545bb1.tar.gz
routine commit
Diffstat (limited to 'src/algorithms.py')
-rw-r--r--src/algorithms.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/algorithms.py b/src/algorithms.py
index 51f57bf..24a63f3 100644
--- a/src/algorithms.py
+++ b/src/algorithms.py
@@ -72,6 +72,8 @@ def correctness_measure(G, G_hat, print_values=True):
f1_score = 2.* tp / (2 * tp + fp + fn)
fall_out = 1. * fp / (fp + tn)
+ norm = np.linalg.norm(G.mat - G_hat.mat)
+
if print_values:
print("False Positives: {}".format(fp))
print("False Negatives: {}".format(fn))
@@ -81,7 +83,8 @@ 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))
+ print("Fall Out: {}".format(fall_out))
+ print("l2_norm: {}".format(norm))
return fp, fn, tp, tn