aboutsummaryrefslogtreecommitdiffstats
path: root/src/algorithms.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-07 16:20:40 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2014-12-07 16:20:40 -0500
commit4ba0141322e8d35da9a762909603bd280dec64bf (patch)
tree97b97530f13ab401ce4b6fc6704d0134adaad78a /src/algorithms.py
parent566f9248c05db44133e3cbf145a4cbaf2fed140d (diff)
downloadcascades-4ba0141322e8d35da9a762909603bd280dec64bf.tar.gz
bug fix: initialization to directed graph missing
Diffstat (limited to 'src/algorithms.py')
-rw-r--r--src/algorithms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/algorithms.py b/src/algorithms.py
index 0e240c9..39bcbb2 100644
--- a/src/algorithms.py
+++ b/src/algorithms.py
@@ -60,7 +60,7 @@ def correctness_measure(G, G_hat, print_values=False):
edges_hat = set(G_hat.edges())
fp = len(edges_hat - edges)
fn = len(edges - edges_hat)
- tp = len(edges | edges_hat)
+ tp = len(edges & edges_hat)
tn = G.number_of_nodes() ** 2 - fp - fn - tp
#Other metrics