aboutsummaryrefslogtreecommitdiffstats
path: root/src/algorithms.py
diff options
context:
space:
mode:
authorjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-03 10:04:12 -0500
committerjeanpouget-abadie <jean.pougetabadie@gmail.com>2015-02-03 10:04:12 -0500
commit12e52fe9e9e1ac286c1b64342a54d7eccd6d9332 (patch)
tree526c3f12b747f328772a2e3fbf0941fd0da21aaa /src/algorithms.py
parentf95792d89fff45e9a3630486805a7c516778db84 (diff)
downloadcascades-12e52fe9e9e1ac286c1b64342a54d7eccd6d9332.tar.gz
fixed weird bug?
Diffstat (limited to 'src/algorithms.py')
-rw-r--r--src/algorithms.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/algorithms.py b/src/algorithms.py
index 9ebccf1..0afee24 100644
--- a/src/algorithms.py
+++ b/src/algorithms.py
@@ -11,7 +11,7 @@ def greedy_prediction(G, cascades):
Returns estimated graph from Greedy algorithm in "Learning Epidemic ..."
Only works for independent cascade model!
"""
- G_hat = cascade_creation.InfluenceGraph(max_proba=None)
+ G_hat = cascade_creation.InfluenceGraph(max_proba=None, min_proba=None)
G_hat.add_nodes_from(G.nodes())
for node in G_hat.nodes():
print(node)
@@ -60,6 +60,10 @@ def correctness_measure(G, G_hat, print_values=False):
"""
edges = set(G.edges())
edges_hat = set(G_hat.edges())
+
+ print(sorted(edges))
+ print(sorted(edges_hat))
+
fp = len(edges_hat - edges)
fn = len(edges - edges_hat)
tp = len(edges & edges_hat)