aboutsummaryrefslogtreecommitdiffstats
path: root/src/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/algorithms.py')
-rw-r--r--src/algorithms.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/algorithms.py b/src/algorithms.py
index c880a7b..29de661 100644
--- a/src/algorithms.py
+++ b/src/algorithms.py
@@ -39,6 +39,11 @@ def recovery_l1obj_l2constraint(G, cascades, floor_cstt, passed_function,
"""
G_hat = cascade_creation.InfluenceGraph(max_proba=None)
G_hat.add_nodes_from(G.nodes())
+
+ ####
+ print(G.nodes())
+ ####
+
for node in G_hat.nodes():
print(node)
try:
@@ -85,10 +90,10 @@ def test():
unit test
"""
G = cascade_creation.InfluenceGraph(max_proba = .8)
- G.erdos_init(n = 100, p = .05)
+ G.erdos_init(n = 10, p = .2)
import time
t0 = time.time()
- A = cascade_creation.generate_cascades(G, .2, 10000)
+ A = cascade_creation.generate_cascades(G, .2, 1000)
if 1:
G_hat = greedy_prediction(G, A)
if 0: